Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GetSingularityRemote ¶
GetSingularityRemote returns the base URI and token for the specified remote name. If the remote name is "" then use the default remote. We do not return a Singularity endpoint construct as we want to avoid the handling of overridden keyservers etc - we are *only* working with the enterprise install.
func GetSingularityRemoteYaml ¶
GetSingularityRemoteYaml returns the path to the singularity installation's remote.yml.
func InitializeConfig ¶
InitializeConfig handle options from a config file and env vars This approach binds viper config directly onto existing flags belonging to the cobra command cmd. This allows us to handle this configuration selectively for standalon operation only without any changes to the flag / option handling under singularity plugin mode.
MIT Licensed https://github.com/carolynvs/stingoftheviper/blob/main/LICENSE
func UserFromToken ¶
UserFromToken returns the user ID from the token sub claim. Validation is not performed here - that is on the server side of any request.
Types ¶
type ServiceConfigResponse ¶
type ServiceConfigResponse struct {
LibraryAPI struct {
URI string `json:"uri"`
} `json:"libraryAPI"`
BuilderAPI struct {
URI string `json:"uri"`
ManagerURI string `json:"managerUri"`
} `json:"builderAPI"`
KeystoreAPI struct {
URI string `json:"uri"`
} `json:"keystoreAPI"`
ConsentAPI struct {
URI string `json:"uri"`
} `json:"consentAPI"`
TokenAPI struct {
URI string `json:"uri"`
} `json:"tokenAPI"`
}
type ServiceURIs ¶
type ServiceURIs struct {
LibraryURI string
BuildManagerURI string
BuildServerURI string
KeyServiceURI string
ConsentServiceURI string
TokenServiceURI string
}
func GetServiceURIs ¶
func GetServiceURIs(remoteURI string) (uris *ServiceURIs, err error)
GetServiceURIs returns a ServiceURIs struct container the URI of each component service of Enterprise.