Documentation ¶
Index ¶
- Constants
- type BaseResource
- type Client
- func (c *Client) GetTeam(ctx context.Context, orgSlug, teamId string) (*Team, error)
- func (c *Client) ListOrganizations(ctx context.Context, pVars *PaginationVars) ([]Organization, string, error)
- func (c *Client) ListRepositories(ctx context.Context, orgSlug string, pVars *PaginationVars) ([]Repository, string, error)
- func (c *Client) ListRepositoryPermissions(ctx context.Context, orgSlug, repoSlug string, pVars *PaginationVars) ([]RepositoryPermission, string, error)
- func (c *Client) ListTeamMembers(ctx context.Context, orgSlug, teamSlug string, pVars *PaginationVars) ([]User, string, error)
- func (c *Client) ListTeams(ctx context.Context, orgSlug string, pVars *PaginationVars) ([]Team, string, error)
- func (c *Client) ListUsers(ctx context.Context, orgSlug string, pVars *PaginationVars) ([]User, string, error)
- func (c *Client) SetCurrentUser(ctx context.Context) error
- type ListResponse
- type Organization
- type PaginationData
- type PaginationVars
- type Repository
- type RepositoryPermission
- type Team
- type User
Constants ¶
View Source
const ( BaseDomain = "hub.docker.com" OrgsEndpoint = "/v2/orgs" OrgDetailEndpoint = OrgsEndpoint + "/%s" UsersEndpoint = OrgsEndpoint + "/%s/members" CurrentUserEndpoint = "/v2/user" UserEndpoint = "/v2/users/%s" UserOrgsEndpoint = UserEndpoint + "/orgs" TeamsEndpoint = OrgsEndpoint + "/%s/groups" TeamDetailEndpoint = TeamsEndpoint + "/%s" TeamMembersEndpoint = TeamDetailEndpoint + "/members" TeamPermissionsEndpoint = TeamDetailEndpoint + "/repositories" RepositoriesEndpoint = "/v2/repositories/%s" RepositoryPermissions = RepositoriesEndpoint + "/%s/groups" )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type BaseResource ¶
type BaseResource struct {
Id string `json:"id"`
}
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
func (*Client) ListOrganizations ¶
func (c *Client) ListOrganizations(ctx context.Context, pVars *PaginationVars) ([]Organization, string, error)
ListOrganizations return organizations for the current user.
func (*Client) ListRepositories ¶
func (c *Client) ListRepositories(ctx context.Context, orgSlug string, pVars *PaginationVars) ([]Repository, string, error)
ListRepositories return repositories under the provided organization.
func (*Client) ListRepositoryPermissions ¶
func (c *Client) ListRepositoryPermissions(ctx context.Context, orgSlug, repoSlug string, pVars *PaginationVars) ([]RepositoryPermission, string, error)
ListTeamPermissions return team permissions on provided repository.
func (*Client) ListTeamMembers ¶
func (c *Client) ListTeamMembers(ctx context.Context, orgSlug, teamSlug string, pVars *PaginationVars) ([]User, string, error)
ListTeamMembers return team members.
func (*Client) ListTeams ¶
func (c *Client) ListTeams(ctx context.Context, orgSlug string, pVars *PaginationVars) ([]Team, string, error)
ListTeams return teams under the provided organization.
type ListResponse ¶
type ListResponse[T any] struct { PaginationData Results []T `json:"results"` }
type Organization ¶
type Organization struct { BaseResource Name string `json:"orgname"` }
type PaginationData ¶
type PaginationVars ¶
type Repository ¶
type RepositoryPermission ¶
Click to show internal directories.
Click to hide internal directories.