Documentation ¶
Index ¶
- func GetDefaultOrNilOrg(orgs []brevapi.Organization) *brevapi.Organization
- func NewRestyClient(brevAPIURL string) *resty.Client
- type Auth
- type AuthHTTPClient
- type AuthHTTPStore
- func (s AuthHTTPStore) CreateOrganization(req CreateOrganizationRequest) (*brevapi.Organization, error)
- func (s AuthHTTPStore) CreateSecret(req CreateSecretRequest) (*CreateSecretRequest, error)
- func (s AuthHTTPStore) GetActiveOrganizationOrDefault() (*brevapi.Organization, error)
- func (s AuthHTTPStore) GetActiveOrganizationOrNil() (*brevapi.Organization, error)
- func (s AuthHTTPStore) GetAllWorkspaces(options *GetWorkspacesOptions) ([]brevapi.Workspace, error)
- func (s AuthHTTPStore) GetCurrentUser() (*brevapi.User, error)
- func (s AuthHTTPStore) GetCurrentUserKeys() (*brevapi.UserKeys, error)
- func (s AuthHTTPStore) GetOrganizations() ([]brevapi.Organization, error)
- func (s AuthHTTPStore) GetWorkspace(workspaceID string) (*brevapi.Workspace, error)
- func (s AuthHTTPStore) GetWorkspaceMetaData(workspaceID string) (*brevapi.WorkspaceMetaData, error)
- func (s AuthHTTPStore) GetWorkspaces(organizationID string, options *GetWorkspacesOptions) ([]brevapi.Workspace, error)
- func (s AuthHTTPStore) NewAuthHTTPStore() *AuthHTTPStore
- func (s *AuthHTTPStore) SetOnAuthFailureHandler(handler func() error)
- func (s AuthHTTPStore) StopWorkspace(workspaceID string) (*brevapi.Workspace, error)
- type BasicStore
- type CreateOrganizationRequest
- type CreateSecretRequest
- type DestConfig
- type DestType
- type FileStore
- func (f FileStore) CreateNewSSHConfigBackup() error
- func (f FileStore) GetPrivateKeyFilePath() string
- func (f FileStore) GetSSHConfig() (string, error)
- func (f *FileStore) WithAuthHTTPClient(c *AuthHTTPClient) *AuthHTTPStore
- func (f *FileStore) WithNoAuthHTTPClient(c *NoAuthHTTPClient) *NoAuthHTTPStore
- func (f FileStore) WritePrivateKey(pem string) error
- func (f FileStore) WriteSSHConfig(config string) error
- type GetWorkspacesOptions
- type HTTPResponseError
- type HierarchyType
- type NoAuthHTTPClient
- type NoAuthHTTPStore
- type SecretReqDest
- type SecretReqSrc
- type SrcConfig
- type SrcType
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GetDefaultOrNilOrg ¶
func GetDefaultOrNilOrg(orgs []brevapi.Organization) *brevapi.Organization
func NewRestyClient ¶
Types ¶
type AuthHTTPClient ¶
type AuthHTTPClient struct {
// contains filtered or unexported fields
}
func NewAuthHTTPClient ¶
func NewAuthHTTPClient(auth Auth, brevAPIURL string) *AuthHTTPClient
type AuthHTTPStore ¶
type AuthHTTPStore struct { NoAuthHTTPStore // contains filtered or unexported fields }
func (AuthHTTPStore) CreateOrganization ¶
func (s AuthHTTPStore) CreateOrganization(req CreateOrganizationRequest) (*brevapi.Organization, error)
func (AuthHTTPStore) CreateSecret ¶
func (s AuthHTTPStore) CreateSecret(req CreateSecretRequest) (*CreateSecretRequest, error)
func (AuthHTTPStore) GetActiveOrganizationOrDefault ¶
func (s AuthHTTPStore) GetActiveOrganizationOrDefault() (*brevapi.Organization, error)
returns the 'set'/active organization or the default one or nil if no orgs exist
func (AuthHTTPStore) GetActiveOrganizationOrNil ¶
func (s AuthHTTPStore) GetActiveOrganizationOrNil() (*brevapi.Organization, error)
returns the 'set'/active organization or nil if not set
func (AuthHTTPStore) GetAllWorkspaces ¶
func (s AuthHTTPStore) GetAllWorkspaces(options *GetWorkspacesOptions) ([]brevapi.Workspace, error)
func (AuthHTTPStore) GetCurrentUser ¶
func (s AuthHTTPStore) GetCurrentUser() (*brevapi.User, error)
func (AuthHTTPStore) GetCurrentUserKeys ¶
func (s AuthHTTPStore) GetCurrentUserKeys() (*brevapi.UserKeys, error)
func (AuthHTTPStore) GetOrganizations ¶
func (s AuthHTTPStore) GetOrganizations() ([]brevapi.Organization, error)
func (AuthHTTPStore) GetWorkspace ¶
func (s AuthHTTPStore) GetWorkspace(workspaceID string) (*brevapi.Workspace, error)
func (AuthHTTPStore) GetWorkspaceMetaData ¶
func (s AuthHTTPStore) GetWorkspaceMetaData(workspaceID string) (*brevapi.WorkspaceMetaData, error)
func (AuthHTTPStore) GetWorkspaces ¶
func (s AuthHTTPStore) GetWorkspaces(organizationID string, options *GetWorkspacesOptions) ([]brevapi.Workspace, error)
func (AuthHTTPStore) NewAuthHTTPStore ¶
func (s AuthHTTPStore) NewAuthHTTPStore() *AuthHTTPStore
Used if need new instance to customize settings
func (*AuthHTTPStore) SetOnAuthFailureHandler ¶
func (s *AuthHTTPStore) SetOnAuthFailureHandler(handler func() error)
func (AuthHTTPStore) StopWorkspace ¶
func (s AuthHTTPStore) StopWorkspace(workspaceID string) (*brevapi.Workspace, error)
type BasicStore ¶
type BasicStore struct{}
func NewBasicStore ¶
func NewBasicStore() *BasicStore
func (*BasicStore) WithFileSystem ¶
func (b *BasicStore) WithFileSystem(fs afero.Fs) *FileStore
type CreateOrganizationRequest ¶
type CreateOrganizationRequest struct {
Name string `json:"name"`
}
type CreateSecretRequest ¶
type CreateSecretRequest struct { Name string `json:"name"` HierarchyType HierarchyType `json:"hierarchyType"` HierarchyID string `json:"hierarchyID"` Src SecretReqSrc `json:"src"` Dest SecretReqDest `json:"dest"` }
type DestConfig ¶
type FileStore ¶
type FileStore struct { BasicStore // contains filtered or unexported fields }
func (FileStore) CreateNewSSHConfigBackup ¶
func (FileStore) GetPrivateKeyFilePath ¶
func (FileStore) GetSSHConfig ¶
!! need something to resolve file path of user ssh
func (*FileStore) WithAuthHTTPClient ¶
func (f *FileStore) WithAuthHTTPClient(c *AuthHTTPClient) *AuthHTTPStore
func (*FileStore) WithNoAuthHTTPClient ¶
func (f *FileStore) WithNoAuthHTTPClient(c *NoAuthHTTPClient) *NoAuthHTTPStore
func (FileStore) WritePrivateKey ¶
func (FileStore) WriteSSHConfig ¶
type GetWorkspacesOptions ¶
type HTTPResponseError ¶
type HTTPResponseError struct {
// contains filtered or unexported fields
}
func NewHTTPResponseError ¶
func NewHTTPResponseError(response *resty.Response) *HTTPResponseError
func (HTTPResponseError) Error ¶
func (e HTTPResponseError) Error() string
type HierarchyType ¶
type HierarchyType string
const ( Org HierarchyType = "org" User HierarchyType = "user" )
type NoAuthHTTPClient ¶
type NoAuthHTTPClient struct {
// contains filtered or unexported fields
}
func NewNoAuthHTTPClient ¶
func NewNoAuthHTTPClient(brevAPIURL string) *NoAuthHTTPClient
type NoAuthHTTPStore ¶
type NoAuthHTTPStore struct { FileStore // contains filtered or unexported fields }
func (NoAuthHTTPStore) CreateUser ¶
func (n NoAuthHTTPStore) CreateUser(identityToken string) (*brevapi.User, error)
func (NoAuthHTTPStore) NewNoAuthHTTPStore ¶
func (n NoAuthHTTPStore) NewNoAuthHTTPStore() *NoAuthHTTPStore
Used if need new instance to customize settings
func (*NoAuthHTTPStore) WithAuth ¶
func (n *NoAuthHTTPStore) WithAuth(auth Auth) *AuthHTTPStore
func (*NoAuthHTTPStore) WithAuthHTTPClient ¶
func (n *NoAuthHTTPStore) WithAuthHTTPClient(c *AuthHTTPClient) *AuthHTTPStore
type SecretReqDest ¶
type SecretReqDest struct { Type DestType `json:"type"` Config DestConfig `json:"config"` }
type SecretReqSrc ¶
Click to show internal directories.
Click to hide internal directories.