Documentation
¶
Index ¶
- Variables
- type AAPGatewayClient
- func (a *AAPGatewayClient) GetMe(token string) (*AAPUser, error)
- func (a *AAPGatewayClient) GetOrganization(token string, organizationID string) (*AAPOrganization, error)
- func (a *AAPGatewayClient) ListOrganizations(token string) ([]*AAPOrganization, error)
- func (a *AAPGatewayClient) ListUserOrganizations(token string, userID string) ([]*AAPOrganization, error)
- func (a *AAPGatewayClient) ListUserTeams(token string, userID string) ([]*AAPTeam, error)
- type AAPGatewayClientOptions
- type AAPOrganization
- type AAPOrganizationsResponse
- type AAPPaginatedResponse
- type AAPTeam
- type AAPTeamSummaryFields
- type AAPTeamsResponse
- type AAPUser
- type AAPUsersResponse
Constants ¶
This section is empty.
Variables ¶
View Source
var ( ErrNotFound = errors.New("resource not found") ErrForbidden = errors.New("resource forbidden") )
Functions ¶
This section is empty.
Types ¶
type AAPGatewayClient ¶
type AAPGatewayClient struct {
// contains filtered or unexported fields
}
func NewAAPGatewayClient ¶
func NewAAPGatewayClient(options AAPGatewayClientOptions) (*AAPGatewayClient, error)
func (*AAPGatewayClient) GetMe ¶
func (a *AAPGatewayClient) GetMe(token string) (*AAPUser, error)
GET /api/gateway/v1/me/
func (*AAPGatewayClient) GetOrganization ¶
func (a *AAPGatewayClient) GetOrganization(token string, organizationID string) (*AAPOrganization, error)
GET /api/gateway/v1/organizations/{organization_id}
func (*AAPGatewayClient) ListOrganizations ¶
func (a *AAPGatewayClient) ListOrganizations(token string) ([]*AAPOrganization, error)
GET /api/gateway/v1/organizations
func (*AAPGatewayClient) ListUserOrganizations ¶
func (a *AAPGatewayClient) ListUserOrganizations(token string, userID string) ([]*AAPOrganization, error)
GET /api/gateway/v1/users/{user_id}/organizations
func (*AAPGatewayClient) ListUserTeams ¶
func (a *AAPGatewayClient) ListUserTeams(token string, userID string) ([]*AAPTeam, error)
GET /api/gateway/v1/users/{user_id}/teams
type AAPGatewayClientOptions ¶
type AAPOrganization ¶
type AAPOrganizationsResponse ¶
type AAPOrganizationsResponse = AAPPaginatedResponse[AAPOrganization]
type AAPPaginatedResponse ¶
type AAPPaginatedResponse[T any] struct { Count int `json:"count"` Next *string `json:"next"` Previous *string `json:"previous"` Results []*T `json:"results"` }
AAP Gateway API response types
type AAPTeam ¶
type AAPTeam struct {
ID int `json:"id"`
SummaryFields AAPTeamSummaryFields `json:"summary_fields"`
}
type AAPTeamSummaryFields ¶
type AAPTeamSummaryFields struct {
Organization AAPOrganization `json:"organization"`
}
type AAPTeamsResponse ¶
type AAPTeamsResponse = AAPPaginatedResponse[AAPTeam]
type AAPUsersResponse ¶
type AAPUsersResponse = AAPPaginatedResponse[AAPUser]
Click to show internal directories.
Click to hide internal directories.