aap

package
v0.10.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 24, 2025 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

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 AAPGatewayClientOptions struct {
	GatewayUrl      string
	TLSClientConfig *tls.Config
	MaxPageSize     *int
}

type AAPOrganization

type AAPOrganization struct {
	ID   int    `json:"id"`
	Name string `json:"name"`
}

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 AAPUser

type AAPUser struct {
	ID                int    `json:"id,omitempty"`
	Username          string `json:"username,omitempty"`
	IsSuperuser       bool   `json:"is_superuser,omitempty"`
	IsPlatformAuditor bool   `json:"is_platform_auditor,omitempty"`
}

type AAPUsersResponse

type AAPUsersResponse = AAPPaginatedResponse[AAPUser]

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL