Documentation ¶
Index ¶
Constants ¶
View Source
const ( // generate using many fair dice rolls OAuth2ClientID = "d0f032e5af41187fdaf45b4aeee76ee4" OAuth2ClientSecret = "4141f52bb9f80dfc776b5b773ccf550d" )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Client ¶
type Client struct { Users UsersAPI Grids GridsAPI Nodes NodesAPI ExternalRegistries ExternalRegistriesAPI // contains filtered or unexported fields }
Client contains exported fields that give access to parts of the API to then make calls on.
type Config ¶
type Config struct { URL string SSLCertPEM []byte SSLServerName string ClientID string // default OAuth2ClientID ClientSecret string // default OAuth2ClientSecret Token *Token // default does anonymous requests without any access token Logger Logger }
func (Config) ExchangeToken ¶
ExchangeToken allows you to exchange a single-use oauth2 code for an access token.
This does not need to have any config.Token set.
func (Config) MakeClient ¶
MakeClient calls ConnectOAuth2() to update the config.LoginToken.
type Error ¶
type Error struct {
// contains filtered or unexported fields
}
func (Error) HTTPStatus ¶
type ExternalRegistriesAPI ¶
type ExternalRegistriesAPI interface { List(grid string) ([]api.ExternalRegistry, error) Get(id api.ExternalRegistryID) (api.ExternalRegistry, error) Create(grid string, params api.ExternalRegistryPOST) (api.ExternalRegistry, error) Delete(id api.ExternalRegistryID) error }
type ForbiddenError ¶
type ForbiddenError Error
func (ForbiddenError) Error ¶
func (err ForbiddenError) Error() string
type NodesAPI ¶
type NodesAPI interface { List(grid string) ([]api.Node, error) Get(id api.NodeID) (api.Node, error) GetToken(id api.NodeID) (api.NodeToken, error) Create(grid string, params api.NodePOST) (api.Node, error) CreateToken(id api.NodeID, params api.NodeTokenParams) (api.NodeToken, error) Update(id api.NodeID, params api.NodePUT) (api.Node, error) UpdateToken(id api.NodeID, token string, params api.NodeTokenParams) (api.NodeToken, error) Delete(id api.NodeID) error DeleteToken(id api.NodeID, params api.NodeTokenParams) error }
type NotFoundError ¶
type NotFoundError Error
func (NotFoundError) Error ¶
func (err NotFoundError) Error() string
Source Files ¶
Click to show internal directories.
Click to hide internal directories.