Documentation
¶
Index ¶
- type CreateKeyOption
- type CreateKeyOptions
- type CreateProjectOption
- type CreateProjectOptions
- type ListKeysOption
- type ListKeysOptions
- type ListProjectsOption
- type ListProjectsOptions
- type Organization
- func (srv *Organization) CreateKey(KeyId string, Name string, Scopes []string, optionalSetters ...CreateKeyOption) (*models.Key, error)
- func (srv *Organization) CreateProject(ProjectId string, Name string, optionalSetters ...CreateProjectOption) (*models.Project, error)
- func (srv *Organization) DeleteKey(KeyId string) (*interface{}, error)
- func (srv *Organization) DeleteProject(ProjectId string) (*interface{}, error)
- func (srv *Organization) GetKey(KeyId string) (*models.Key, error)
- func (srv *Organization) GetProject(ProjectId string) (*models.Project, error)
- func (srv *Organization) ListKeys(optionalSetters ...ListKeysOption) (*models.KeyList, error)
- func (srv *Organization) ListProjects(optionalSetters ...ListProjectsOption) (*models.ProjectList, error)
- func (srv *Organization) UpdateKey(KeyId string, Name string, Scopes []string, optionalSetters ...UpdateKeyOption) (*models.Key, error)
- func (srv *Organization) UpdateProject(ProjectId string, Name string) (*models.Project, error)
- func (srv *Organization) WithCreateKeyExpire(v string) CreateKeyOption
- func (srv *Organization) WithCreateProjectRegion(v string) CreateProjectOption
- func (srv *Organization) WithListKeysQueries(v []string) ListKeysOption
- func (srv *Organization) WithListKeysTotal(v bool) ListKeysOption
- func (srv *Organization) WithListProjectsQueries(v []string) ListProjectsOption
- func (srv *Organization) WithListProjectsSearch(v string) ListProjectsOption
- func (srv *Organization) WithListProjectsTotal(v bool) ListProjectsOption
- func (srv *Organization) WithUpdateKeyExpire(v string) UpdateKeyOption
- type UpdateKeyOption
- type UpdateKeyOptions
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type CreateKeyOption ¶
type CreateKeyOption func(*CreateKeyOptions)
type CreateKeyOptions ¶
type CreateKeyOptions struct {
Expire string
// contains filtered or unexported fields
}
func (CreateKeyOptions) New ¶
func (options CreateKeyOptions) New() *CreateKeyOptions
type CreateProjectOption ¶
type CreateProjectOption func(*CreateProjectOptions)
type CreateProjectOptions ¶
type CreateProjectOptions struct {
Region string
// contains filtered or unexported fields
}
func (CreateProjectOptions) New ¶
func (options CreateProjectOptions) New() *CreateProjectOptions
type ListKeysOption ¶
type ListKeysOption func(*ListKeysOptions)
type ListKeysOptions ¶
type ListKeysOptions struct {
Queries []string
Total bool
// contains filtered or unexported fields
}
func (ListKeysOptions) New ¶
func (options ListKeysOptions) New() *ListKeysOptions
type ListProjectsOption ¶
type ListProjectsOption func(*ListProjectsOptions)
type ListProjectsOptions ¶
type ListProjectsOptions struct {
Queries []string
Search string
Total bool
// contains filtered or unexported fields
}
func (ListProjectsOptions) New ¶
func (options ListProjectsOptions) New() *ListProjectsOptions
type Organization ¶
type Organization struct {
// contains filtered or unexported fields
}
Organization service
func New ¶
func New(clt client.Client) *Organization
func (*Organization) CreateKey ¶
func (srv *Organization) CreateKey(KeyId string, Name string, Scopes []string, optionalSetters ...CreateKeyOption) (*models.Key, error)
CreateKey create a new organization API key.
func (*Organization) CreateProject ¶
func (srv *Organization) CreateProject(ProjectId string, Name string, optionalSetters ...CreateProjectOption) (*models.Project, error)
CreateProject create a new project.
func (*Organization) DeleteKey ¶
func (srv *Organization) DeleteKey(KeyId string) (*interface{}, error)
DeleteKey delete a key by its unique ID. Once deleted, the key can no longer be used to authenticate API calls.
func (*Organization) DeleteProject ¶
func (srv *Organization) DeleteProject(ProjectId string) (*interface{}, error)
DeleteProject delete a project by its unique ID.
func (*Organization) GetKey ¶
func (srv *Organization) GetKey(KeyId string) (*models.Key, error)
GetKey get a key by its unique ID. This endpoint returns details about a specific API key in your organization including its scopes.
func (*Organization) GetProject ¶
func (srv *Organization) GetProject(ProjectId string) (*models.Project, error)
GetProject get a project.
func (*Organization) ListKeys ¶
func (srv *Organization) ListKeys(optionalSetters ...ListKeysOption) (*models.KeyList, error)
ListKeys get a list of all API keys from the current organization.
func (*Organization) ListProjects ¶
func (srv *Organization) ListProjects(optionalSetters ...ListProjectsOption) (*models.ProjectList, error)
ListProjects get a list of all projects. You can use the query params to filter your results.
func (*Organization) UpdateKey ¶
func (srv *Organization) UpdateKey(KeyId string, Name string, Scopes []string, optionalSetters ...UpdateKeyOption) (*models.Key, error)
UpdateKey update a key by its unique ID. Use this endpoint to update the name, scopes, or expiration time of an API key.
func (*Organization) UpdateProject ¶
UpdateProject update a project by its unique ID.
func (*Organization) WithCreateKeyExpire ¶
func (srv *Organization) WithCreateKeyExpire(v string) CreateKeyOption
func (*Organization) WithCreateProjectRegion ¶
func (srv *Organization) WithCreateProjectRegion(v string) CreateProjectOption
func (*Organization) WithListKeysQueries ¶
func (srv *Organization) WithListKeysQueries(v []string) ListKeysOption
func (*Organization) WithListKeysTotal ¶
func (srv *Organization) WithListKeysTotal(v bool) ListKeysOption
func (*Organization) WithListProjectsQueries ¶
func (srv *Organization) WithListProjectsQueries(v []string) ListProjectsOption
func (*Organization) WithListProjectsSearch ¶
func (srv *Organization) WithListProjectsSearch(v string) ListProjectsOption
func (*Organization) WithListProjectsTotal ¶
func (srv *Organization) WithListProjectsTotal(v bool) ListProjectsOption
func (*Organization) WithUpdateKeyExpire ¶
func (srv *Organization) WithUpdateKeyExpire(v string) UpdateKeyOption
type UpdateKeyOption ¶
type UpdateKeyOption func(*UpdateKeyOptions)
type UpdateKeyOptions ¶
type UpdateKeyOptions struct {
Expire string
// contains filtered or unexported fields
}
func (UpdateKeyOptions) New ¶
func (options UpdateKeyOptions) New() *UpdateKeyOptions