Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GetAccountName ¶
GetAccountName returns a account name from a provider name and provider ID
Types ¶
type AccessToken ¶
AccessToken are used to make API requests on behalf of a user. The access token represents the authorization of a specific application to access specific parts of a user’s data.
type AccessTokenService ¶
type AccessTokenService interface {
Get(token string) (*AccessToken, error)
Put(token string, at AccessToken) error
}
AccessTokenService provides access to AccessToken objects.
type AccountService ¶
type AccountService interface {
Upsert(name string, a Account) error
Get(name string) (*Account, error)
}
AccountService provides access to Account objects.
type MachineType ¶
type MachineType struct {
ID int64 `json:"id"`
DisplayName string `json:"name"`
Features []string `json:"features,omitempty"`
Login string `json:"login"`
Password string `json:"password"`
}
MachineType describes a set of machines/hosts sharing same hardware specs
func (MachineType) ToBytes ¶
func (mtm MachineType) ToBytes() []byte
type MachineTypeService ¶
type MachineTypeService interface {
GetByID(accountName string, id int64) (*MachineType, error)
GetByUsername(username string) (*MachineType, error)
Add(accountName string, machineType *MachineType) error
Delete(accountName string, id int64) error
List(accountName string) ([]MachineType, error)
Update(accountName string, machineType MachineType) error
Init() error
CheckPassword(plain, hash string) bool
GenPasswordHash(pwd string) string
}
MachineTypeService provides access to machine types objects.
type Service ¶
type Service interface {
MachineTypeService(ctx context.Context) (MachineTypeService, error)
AccessTokenService(ctx context.Context) (AccessTokenService, error)
AccountService(ctx context.Context) (AccountService, error)
}
Service provides access to all storage objects.
Source Files
¶
Click to show internal directories.
Click to hide internal directories.