user

package
v0.1.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Mar 9, 2024 License: MIT Imports: 5 Imported by: 0

Documentation

Overview

Package user implements the functionality of User methods. Package implements getAccountInfo and toggleSsh methods. To create the appropriate methods, you need to call either CallGetAccountInfo or CallToggleSSH.

Index

Constants

View Source
const (
	GetAccountInfoMethodName = "GetAccountInfo"
	GetAccountInfoPath       = "user/getAccountInfo"

	ToggleSSHMethodName = "ToggleSsh"
	ToggleSSHMethodPath = "user/toggleSsh"
)

Constants used to implement the getAccountInfo and toggleSsh methods.

Variables

This section is empty.

Functions

func CallGetAccountInfo

func CallGetAccountInfo() core.APIMethod[result.UserInfo]

CallGetAccountInfo is a creation function that returns a core.APIMethod corresponding to the method getAccountInfo.

func CallToggleSSH

func CallToggleSSH(status Status) core.APIMethod[result.SSHToggle]

CallToggleSSH is a creation function that returns a core.APIMethod corresponding to the method toggleSsh. The function is waiting for SSH status to be received for the main Beget account.

func CallToggleSSHFTP

func CallToggleSSHFTP(status Status, fTPLogin string) core.APIMethod[result.SSHToggle]

CallToggleSSHFTP is a creation function that returns a core.APIMethod corresponding to the method toggleSsh. The function waits for the FTP account login and SSH status for this account.

Types

type Status

type Status rune

Status represents the status of SSH permissions.

const (
	ENABLE  Status = '1' // SSH connection is enabled for an account
	DISABLE Status = '0' // SSH connection is disabled for an account
)

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL