Documentation
¶
Index ¶
- Constants
- Variables
- func CreateProfiler(driverType ProfileDriver) (*osprofiles.Profiler, error)
- func Migrate(to ProfileDriver, from ProfileDriver) error
- func NewProfiler(store string) (*osprofiles.Profiler, error)
- type AuthCredentials
- type AuthCredentialsAccessToken
- type OtdfctlProfileStore
- func (p *OtdfctlProfileStore) GetAuthCredentials() AuthCredentials
- func (p *OtdfctlProfileStore) GetEndpoint() string
- func (p *OtdfctlProfileStore) GetTLSNoVerify() bool
- func (p *OtdfctlProfileStore) IsDefault() bool
- func (p *OtdfctlProfileStore) Name() string
- func (p *OtdfctlProfileStore) SetAuthCredentials(authCredentials AuthCredentials) error
- func (p *OtdfctlProfileStore) SetEndpoint(endpoint string) error
- func (p *OtdfctlProfileStore) SetTLSNoVerify(tlsNoVerify bool) error
- type ProfileConfig
- type ProfileDriver
Constants ¶
View Source
const ( AuthTypeClientCredentials = "client-credentials" AuthTypeAccessToken = "access-token" )
Variables ¶
View Source
var ( ErrDeletingDefaultProfile = errors.New("cannot delete the default profile") ErrProfileIsEmpty = errors.New("error profile is empty") ErrProfileIncorrectType = errors.New("error profile is not of type ProfileConfig") ErrCreatingPlatform = errors.New("error when creating platform") ErrCreatingNewProfile = errors.New("error creating profile") ErrUnknownProfileDriverType = errors.New("error unknown profile driver type") ErrCleaningUpProfiles = errors.New("error occurred when cleaning up profiles") )
Functions ¶
func CreateProfiler ¶ added in v0.27.0
func CreateProfiler(driverType ProfileDriver) (*osprofiles.Profiler, error)
func Migrate ¶ added in v0.27.0
func Migrate(to ProfileDriver, from ProfileDriver) error
func NewProfiler ¶ added in v0.27.0
func NewProfiler(store string) (*osprofiles.Profiler, error)
Types ¶
type AuthCredentials ¶
type AuthCredentials struct {
AuthType string `json:"authType"`
ClientID string `json:"clientId"`
// Used for client credentials
ClientSecret string `json:"clientSecret,omitempty"`
AccessToken AuthCredentialsAccessToken `json:"accessToken,omitempty"`
}
type OtdfctlProfileStore ¶ added in v0.27.0
type OtdfctlProfileStore struct {
// contains filtered or unexported fields
}
func LoadOtdfctlProfileStore ¶ added in v0.27.0
func LoadOtdfctlProfileStore(storeType ProfileDriver, profileName string) (*OtdfctlProfileStore, error)
func NewOtdfctlProfileStore ¶ added in v0.27.0
func NewOtdfctlProfileStore(storeType ProfileDriver, config *ProfileConfig, setDefault bool) (*OtdfctlProfileStore, error)
func (*OtdfctlProfileStore) GetAuthCredentials ¶ added in v0.27.0
func (p *OtdfctlProfileStore) GetAuthCredentials() AuthCredentials
func (*OtdfctlProfileStore) GetEndpoint ¶ added in v0.27.0
func (p *OtdfctlProfileStore) GetEndpoint() string
func (*OtdfctlProfileStore) GetTLSNoVerify ¶ added in v0.27.0
func (p *OtdfctlProfileStore) GetTLSNoVerify() bool
func (*OtdfctlProfileStore) IsDefault ¶ added in v0.27.0
func (p *OtdfctlProfileStore) IsDefault() bool
func (*OtdfctlProfileStore) Name ¶ added in v0.27.0
func (p *OtdfctlProfileStore) Name() string
func (*OtdfctlProfileStore) SetAuthCredentials ¶ added in v0.27.0
func (p *OtdfctlProfileStore) SetAuthCredentials(authCredentials AuthCredentials) error
func (*OtdfctlProfileStore) SetEndpoint ¶ added in v0.27.0
func (p *OtdfctlProfileStore) SetEndpoint(endpoint string) error
func (*OtdfctlProfileStore) SetTLSNoVerify ¶ added in v0.27.0
func (p *OtdfctlProfileStore) SetTLSNoVerify(tlsNoVerify bool) error
type ProfileConfig ¶
type ProfileConfig struct {
Name string `json:"profile"`
Endpoint string `json:"endpoint"`
TLSNoVerify bool `json:"tlsNoVerify"`
AuthCredentials AuthCredentials `json:"authCredentials"`
}
func (*ProfileConfig) GetName ¶ added in v0.27.0
func (pc *ProfileConfig) GetName() string
type ProfileDriver ¶ added in v0.13.0
type ProfileDriver string
const ( ProfileDriverKeyring ProfileDriver = "keyring" ProfileDriverMemory ProfileDriver = "in-memory" ProfileDriverFileSystem ProfileDriver = "filesystem" ProfileDriverUnknown ProfileDriver = "unknown" ProfileDriverDefault = ProfileDriverFileSystem )
func ToProfileDriver ¶ added in v0.27.0
func ToProfileDriver(driverType string) (ProfileDriver, error)
Click to show internal directories.
Click to hide internal directories.