util

package
v0.0.0-...-6c375ee Latest Latest
Warning

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

Go to latest
Published: Jul 1, 2023 License: MIT Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CountdownProgressBar

func CountdownProgressBar(cancelCounter *CancelCounter)

func GetIPAddresses

func GetIPAddresses() ([]string, error)

func GetInstanceID

func GetInstanceID() (string, error)

func GetUUID

func GetUUID() (string, error)

Types

type AuthStatus

type AuthStatus int
const (
	AUTH_SUCCESS AuthStatus = iota
	AUTH_FAILURE
	AUTH_TIMEOUT
)

func Authenticate

func Authenticate(connectBean ConnectRequest, appID string) (status AuthStatus)

func PassageAuthentication

func PassageAuthentication(authToken string, appID string, userIDFromFile string) (authStatus AuthStatus)

type CancelCounter

type CancelCounter struct {
	// contains filtered or unexported fields
}

func NewCancelCounter

func NewCancelCounter(countdown int) *CancelCounter

func (*CancelCounter) Cancel

func (c *CancelCounter) Cancel()

func (*CancelCounter) Countdown

func (c *CancelCounter) Countdown() int

func (*CancelCounter) IsCancelled

func (c *CancelCounter) IsCancelled() bool

type ConnectRequest

type ConnectRequest struct {
	UserID string `json:"user_id"`
}

type ConnectResponse

type ConnectResponse struct {
	Token   string `json:"token"`
	Message string `json:"message"`
}

Jump to

Keyboard shortcuts

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