Documentation ¶
Index ¶
- Constants
- Variables
- func CreateDBPool(ctx context.Context, dburl string) (*pgxpool.Pool, error)
- func CreateSSHConfig(filename, username string, timeout time.Duration) (*ssh.ClientConfig, error)
- func GetAllSlotsNumberJSONBytes(num int32, active bool) []byte
- func GetAllSlotsNumberStatement(schema string, active bool) string
- func GetFreeSlotsNumberJSONBytes(num int32, active bool) []byte
- func GetFreeSlotsNumberStatement(schema string, active bool) string
- func IsZeroEnding(ip netip.Addr) bool
- func LastPrefixIPv4(p netip.Prefix) netip.Addr
- func LastPrefixIPv6(p netip.Prefix) netip.Addr
- func LookupForSSHKeyfile(keyFilename, path string) (string, error)
- func NewSSHCient(sshconf *ssh.ClientConfig, server string) (*ssh.Client, *bytes.Buffer, *bytes.Buffer, func(string), error)
- func RandomAddrIPv4(p netip.Prefix) netip.Addr
- func RandomAddrIPv6(p netip.Prefix) netip.Addr
- func SSHSessionRun(client *ssh.Client, b, e *bytes.Buffer, cmd string) error
- func SSHSessionStart(client *ssh.Client, b, e *bytes.Buffer, cmd string, data io.Reader) error
- func SubdomainDelete(host, token, subdomain string) error
- func SubdomainPick(host, token string) (string, error)
Constants ¶
View Source
const ( SSHKeyED25519Filename = "id_ed25519" SSHDefaultFilename = SSHKeyED25519Filename SSHDefaultTimeOut = time.Duration(5 * time.Second) )
View Source
const APIRequestTimeout = 10 * time.Second
Variables ¶
View Source
var ErrEmptySubdomain = errors.New("empty subdomain")
ErrEmptySubdomain - is returned when the subdomain is empty
View Source
var ErrNoSSHKeyFile = errors.New("no ssh key file")
Functions ¶
func CreateSSHConfig ¶
CreateSSHConfig - creates ssh client config.
func LastPrefixIPv4 ¶
LastPrefixIPv4 - last ip addr in the prefix.
func LastPrefixIPv6 ¶
LastPrefixIPv6 - last ip addr in the prefix.
func LookupForSSHKeyfile ¶
func NewSSHCient ¶
func RandomAddrIPv4 ¶
RandomAddrIPv4 - random ipv4 addr inside prefix.
func RandomAddrIPv6 ¶
RandomAddrIPv6 - random ipv6 addr inside prefix.
func SSHSessionStart ¶
func SubdomainDelete ¶
func SubdomainPick ¶
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.