Documentation
¶
Index ¶
- type CreateInstallationOption
- type CreateInstallationOptions
- type CreateKeyOption
- type CreateKeyOptions
- type CreateMembershipOption
- type CreateMembershipOptions
- type CreateProjectOption
- type CreateProjectOptions
- type ListInstallationsOption
- type ListInstallationsOptions
- type ListKeysOption
- type ListKeysOptions
- type ListMembershipsOption
- type ListMembershipsOptions
- type ListProjectsOption
- type ListProjectsOptions
- type Organization
- func (srv *Organization) CreateInstallation(AppId string, optionalSetters ...CreateInstallationOption) (*models.AppInstallation, error)
- func (srv *Organization) CreateKey(KeyId string, Name string, Scopes []string, optionalSetters ...CreateKeyOption) (*models.Key, error)
- func (srv *Organization) CreateMembership(Roles []string, optionalSetters ...CreateMembershipOption) (*models.Membership, error)
- func (srv *Organization) CreateProject(ProjectId string, Name string, optionalSetters ...CreateProjectOption) (*models.Project, error)
- func (srv *Organization) Delete() (*interface{}, error)
- func (srv *Organization) DeleteInstallation(InstallationId string) (*interface{}, error)
- func (srv *Organization) DeleteKey(KeyId string) (*interface{}, error)
- func (srv *Organization) DeleteMembership(MembershipId string) (*interface{}, error)
- func (srv *Organization) DeleteProject(ProjectId string) (*interface{}, error)
- func (srv *Organization) Get() (*models.Organization, error)
- func (srv *Organization) GetInstallation(InstallationId string) (*models.AppInstallation, error)
- func (srv *Organization) GetKey(KeyId string) (*models.Key, error)
- func (srv *Organization) GetMembership(MembershipId string) (*models.Membership, error)
- func (srv *Organization) GetProject(ProjectId string) (*models.Project, error)
- func (srv *Organization) ListInstallations(optionalSetters ...ListInstallationsOption) (*models.AppInstallationList, error)
- func (srv *Organization) ListKeys(optionalSetters ...ListKeysOption) (*models.KeyList, error)
- func (srv *Organization) ListMemberships(optionalSetters ...ListMembershipsOption) (*models.MembershipList, error)
- func (srv *Organization) ListProjects(optionalSetters ...ListProjectsOption) (*models.ProjectList, error)
- func (srv *Organization) Update(Name string) (*models.Organization, error)
- func (srv *Organization) UpdateInstallation(InstallationId string, optionalSetters ...UpdateInstallationOption) (*models.AppInstallation, error)
- func (srv *Organization) UpdateKey(KeyId string, Name string, Scopes []string, optionalSetters ...UpdateKeyOption) (*models.Key, error)
- func (srv *Organization) UpdateMembership(MembershipId string, Roles []string) (*models.Membership, error)
- func (srv *Organization) UpdateProject(ProjectId string, Name string) (*models.Project, error)
- func (srv *Organization) WithCreateInstallationAuthorizationDetails(v string) CreateInstallationOption
- func (srv *Organization) WithCreateKeyExpire(v string) CreateKeyOption
- func (srv *Organization) WithCreateMembershipEmail(v string) CreateMembershipOption
- func (srv *Organization) WithCreateMembershipName(v string) CreateMembershipOption
- func (srv *Organization) WithCreateMembershipPhone(v string) CreateMembershipOption
- func (srv *Organization) WithCreateMembershipUrl(v string) CreateMembershipOption
- func (srv *Organization) WithCreateMembershipUserId(v string) CreateMembershipOption
- func (srv *Organization) WithCreateProjectRegion(v string) CreateProjectOption
- func (srv *Organization) WithListInstallationsQueries(v []string) ListInstallationsOption
- func (srv *Organization) WithListInstallationsTotal(v bool) ListInstallationsOption
- func (srv *Organization) WithListKeysQueries(v []string) ListKeysOption
- func (srv *Organization) WithListKeysTotal(v bool) ListKeysOption
- func (srv *Organization) WithListMembershipsQueries(v []string) ListMembershipsOption
- func (srv *Organization) WithListMembershipsSearch(v string) ListMembershipsOption
- func (srv *Organization) WithListMembershipsTotal(v bool) ListMembershipsOption
- func (srv *Organization) WithListProjectsQueries(v []string) ListProjectsOption
- func (srv *Organization) WithListProjectsSearch(v string) ListProjectsOption
- func (srv *Organization) WithListProjectsTotal(v bool) ListProjectsOption
- func (srv *Organization) WithUpdateInstallationAuthorizationDetails(v string) UpdateInstallationOption
- func (srv *Organization) WithUpdateKeyExpire(v string) UpdateKeyOption
- type UpdateInstallationOption
- type UpdateInstallationOptions
- type UpdateKeyOption
- type UpdateKeyOptions
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type CreateInstallationOption ¶
type CreateInstallationOption func(*CreateInstallationOptions)
type CreateInstallationOptions ¶
type CreateInstallationOptions struct {
AuthorizationDetails string
// contains filtered or unexported fields
}
func (CreateInstallationOptions) New ¶
func (options CreateInstallationOptions) New() *CreateInstallationOptions
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 CreateMembershipOption ¶
type CreateMembershipOption func(*CreateMembershipOptions)
type CreateMembershipOptions ¶
type CreateMembershipOptions struct {
Email string
UserId string
Phone string
Url string
Name string
// contains filtered or unexported fields
}
func (CreateMembershipOptions) New ¶
func (options CreateMembershipOptions) New() *CreateMembershipOptions
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 ListInstallationsOption ¶
type ListInstallationsOption func(*ListInstallationsOptions)
type ListInstallationsOptions ¶
type ListInstallationsOptions struct {
Queries []string
Total bool
// contains filtered or unexported fields
}
func (ListInstallationsOptions) New ¶
func (options ListInstallationsOptions) New() *ListInstallationsOptions
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 ListMembershipsOption ¶
type ListMembershipsOption func(*ListMembershipsOptions)
type ListMembershipsOptions ¶
type ListMembershipsOptions struct {
Queries []string
Search string
Total bool
// contains filtered or unexported fields
}
func (ListMembershipsOptions) New ¶
func (options ListMembershipsOptions) New() *ListMembershipsOptions
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) CreateInstallation ¶
func (srv *Organization) CreateInstallation(AppId string, optionalSetters ...CreateInstallationOption) (*models.AppInstallation, error)
CreateInstallation install an app on the organization. Only organization members with the owner role can install apps. The installation is granted the scopes the app currently requests.
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) CreateMembership ¶
func (srv *Organization) CreateMembership(Roles []string, optionalSetters ...CreateMembershipOption) (*models.Membership, error)
CreateMembership invite a new member to join the current organization. An email with a link to join the organization will be sent to the new member's email address. If member doesn't exist in the project it will be automatically created.
func (*Organization) CreateProject ¶
func (srv *Organization) CreateProject(ProjectId string, Name string, optionalSetters ...CreateProjectOption) (*models.Project, error)
CreateProject create a new project.
func (*Organization) Delete ¶
func (srv *Organization) Delete() (*interface{}, error)
Delete delete the current organization. All projects that belong to the organization are deleted as well.
func (*Organization) DeleteInstallation ¶
func (srv *Organization) DeleteInstallation(InstallationId string) (*interface{}, error)
DeleteInstallation uninstall an app from the organization by its installation ID. Only organization members with the owner role can remove installations. Previously issued installation access tokens are revoked.
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) DeleteMembership ¶
func (srv *Organization) DeleteMembership(MembershipId string) (*interface{}, error)
DeleteMembership remove a member from the current organization. The member is removed whether they accepted the invitation or not; a pending invitation is revoked.
func (*Organization) DeleteProject ¶
func (srv *Organization) DeleteProject(ProjectId string) (*interface{}, error)
DeleteProject delete a project by its unique ID.
func (*Organization) Get ¶
func (srv *Organization) Get() (*models.Organization, error)
Get get the current organization.
func (*Organization) GetInstallation ¶
func (srv *Organization) GetInstallation(InstallationId string) (*models.AppInstallation, error)
GetInstallation get an app installation on the organization by its unique ID. Any organization member can read installations.
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) GetMembership ¶
func (srv *Organization) GetMembership(MembershipId string) (*models.Membership, error)
GetMembership get a membership from the current organization by its unique ID.
func (*Organization) GetProject ¶
func (srv *Organization) GetProject(ProjectId string) (*models.Project, error)
GetProject get a project.
func (*Organization) ListInstallations ¶
func (srv *Organization) ListInstallations(optionalSetters ...ListInstallationsOption) (*models.AppInstallationList, error)
ListInstallations list app installations on the organization. Any organization member can read installations.
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) ListMemberships ¶
func (srv *Organization) ListMemberships(optionalSetters ...ListMembershipsOption) (*models.MembershipList, error)
ListMemberships get a list of all memberships 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) Update ¶
func (srv *Organization) Update(Name string) (*models.Organization, error)
Update update the current organization's name.
func (*Organization) UpdateInstallation ¶
func (srv *Organization) UpdateInstallation(InstallationId string, optionalSetters ...UpdateInstallationOption) (*models.AppInstallation, error)
UpdateInstallation update an app installation on the organization. Only organization members with the owner role can update installations. The installation's granted scopes are refreshed to the scopes the app currently requests; previously issued installation access tokens are revoked.
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) UpdateMembership ¶
func (srv *Organization) UpdateMembership(MembershipId string, Roles []string) (*models.Membership, error)
UpdateMembership modify the roles of a member in the current organization.
func (*Organization) UpdateProject ¶
UpdateProject update a project by its unique ID.
func (*Organization) WithCreateInstallationAuthorizationDetails ¶
func (srv *Organization) WithCreateInstallationAuthorizationDetails(v string) CreateInstallationOption
func (*Organization) WithCreateKeyExpire ¶
func (srv *Organization) WithCreateKeyExpire(v string) CreateKeyOption
func (*Organization) WithCreateMembershipEmail ¶
func (srv *Organization) WithCreateMembershipEmail(v string) CreateMembershipOption
func (*Organization) WithCreateMembershipName ¶
func (srv *Organization) WithCreateMembershipName(v string) CreateMembershipOption
func (*Organization) WithCreateMembershipPhone ¶
func (srv *Organization) WithCreateMembershipPhone(v string) CreateMembershipOption
func (*Organization) WithCreateMembershipUrl ¶
func (srv *Organization) WithCreateMembershipUrl(v string) CreateMembershipOption
func (*Organization) WithCreateMembershipUserId ¶
func (srv *Organization) WithCreateMembershipUserId(v string) CreateMembershipOption
func (*Organization) WithCreateProjectRegion ¶
func (srv *Organization) WithCreateProjectRegion(v string) CreateProjectOption
func (*Organization) WithListInstallationsQueries ¶
func (srv *Organization) WithListInstallationsQueries(v []string) ListInstallationsOption
func (*Organization) WithListInstallationsTotal ¶
func (srv *Organization) WithListInstallationsTotal(v bool) ListInstallationsOption
func (*Organization) WithListKeysQueries ¶
func (srv *Organization) WithListKeysQueries(v []string) ListKeysOption
func (*Organization) WithListKeysTotal ¶
func (srv *Organization) WithListKeysTotal(v bool) ListKeysOption
func (*Organization) WithListMembershipsQueries ¶
func (srv *Organization) WithListMembershipsQueries(v []string) ListMembershipsOption
func (*Organization) WithListMembershipsSearch ¶
func (srv *Organization) WithListMembershipsSearch(v string) ListMembershipsOption
func (*Organization) WithListMembershipsTotal ¶
func (srv *Organization) WithListMembershipsTotal(v bool) ListMembershipsOption
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) WithUpdateInstallationAuthorizationDetails ¶
func (srv *Organization) WithUpdateInstallationAuthorizationDetails(v string) UpdateInstallationOption
func (*Organization) WithUpdateKeyExpire ¶
func (srv *Organization) WithUpdateKeyExpire(v string) UpdateKeyOption
type UpdateInstallationOption ¶
type UpdateInstallationOption func(*UpdateInstallationOptions)
type UpdateInstallationOptions ¶
type UpdateInstallationOptions struct {
AuthorizationDetails string
// contains filtered or unexported fields
}
func (UpdateInstallationOptions) New ¶
func (options UpdateInstallationOptions) New() *UpdateInstallationOptions
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