Documentation ¶
Index ¶
- func ExpiryDate() int64
- func FindFile(paths []string) (string, error)
- func GetKey(token *jwt.Token) (interface{}, error)
- func Hostname() string
- func SecretKey() []byte
- func Username() string
- func Validate(token *Token) bool
- type Account
- type AccountMap
- type Authentication
- type ClientConfig
- type Token
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Account ¶
type Account struct { Username string Hostname string Passwd string Directory string Uid uint32 Gid uint32 NextId uint Token *Token }
All of the information necessary for both the client and server to function.
func FindAccount ¶
type AccountMap ¶
type Authentication ¶
type Authentication struct { Map *AccountMap // contains filtered or unexported fields }
func NewAuthentication ¶
func NewAuthentication() *Authentication
func (*Authentication) Find ¶
func (auth *Authentication) Find(username string) *Account
func (*Authentication) GetFilepath ¶
func (auth *Authentication) GetFilepath() string
TODO: Quick fix to expose the file name
func (*Authentication) Reload ¶
func (auth *Authentication) Reload()
func (*Authentication) UpdateAccount ¶
func (auth *Authentication) UpdateAccount(account *Account)
Update the datastructure in memory
type ClientConfig ¶
type ClientConfig struct { Protocol string Hostname string Port string Username string Credentials string Token *Token }
func NewClientConfig ¶
func NewClientConfig(hostname string, username string, token *Token) *ClientConfig
Register initialization
func (*ClientConfig) GetUrl ¶
func (config *ClientConfig) GetUrl(request_type string) string
func (*ClientConfig) SaveConfig ¶
func (config *ClientConfig) SaveConfig()
Click to show internal directories.
Click to hide internal directories.