Documentation
¶
Index ¶
Constants ¶
const OpenrcPath = "/etc/admin-openrc.sh"
OpenrcPath is CubeCOS's admin credential file.
Variables ¶
var ErrUnknownService = errors.New("no such service in the catalogue")
ErrUnknownService is returned for a service type the catalogue lacks.
Functions ¶
This section is empty.
Types ¶
type Admin ¶
type Admin struct {
Path string
// contains filtered or unexported fields
}
Admin holds a token for the node's admin credential and the catalogue it came with. The openrc file is re-read on each authentication.
func (*Admin) Endpoint ¶
Endpoint returns the service's endpoint (internal before public) and a token to call it with.
func (*Admin) Invalidate ¶
func (a *Admin) Invalidate()
Invalidate drops the cached token, e.g. after a 401.
type Openrc ¶
type Openrc struct {
AuthURL, Username, Password, Project, UserDomain, ProjectDomain, CACert string
}
Openrc is the admin credential an openrc file exports.
func ReadOpenrc ¶
ReadOpenrc reads the `export OS_*=value` lines of an openrc file. It does not run the file.