Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type DownloadService ¶
type DownloadService interface { // Download downloads. Download( ctx context.Context, owner string, repository string, commit string, ) (module *v1alpha1.Module, err error) }
DownloadService is the download service.
type OrganizationService ¶
type OrganizationService interface { // GetOrganization gets a organization by ID. GetOrganization(ctx context.Context, id string) (organization *v1alpha1.Organization, err error) // GetOrganizationByName gets a organization by name. GetOrganizationByName(ctx context.Context, name string) (organization *v1alpha1.Organization, err error) // ListOrganizations lists all organizations. ListOrganizations( ctx context.Context, pageSize uint32, pageToken string, reverse bool, ) (organizations []*v1alpha1.Organization, nextPageToken string, err error) // ListUserOrganizations lists all organizations a user is member of. ListUserOrganizations( ctx context.Context, userId string, pageSize uint32, pageToken string, reverse bool, ) (organizations []*v1alpha1.Organization, nextPageToken string, err error) // CreateOrganization creates a new organization. CreateOrganization(ctx context.Context, name string) (organization *v1alpha1.Organization, err error) // UpdateOrganizationName updates a organization's name. UpdateOrganizationName( ctx context.Context, id string, newName string, ) (organization *v1alpha1.Organization, err error) // UpdateOrganizationNameByName updates a organization's name by name. UpdateOrganizationNameByName( ctx context.Context, name string, newName string, ) (organization *v1alpha1.Organization, err error) // DeleteOrganization deletes a organization. DeleteOrganization(ctx context.Context, id string) (err error) // DeleteOrganizationByName deletes a organization by name. DeleteOrganizationByName(ctx context.Context, name string) (err error) // AddOrganizationBaseRepositoryScope adds a base repository scope to an organization by ID. AddOrganizationBaseRepositoryScope( ctx context.Context, id string, repositoryScope v1alpha1.RepositoryScope, ) (err error) // AddOrganizationBaseRepositoryScopeByName adds a base repository scope to an organization by name. AddOrganizationBaseRepositoryScopeByName( ctx context.Context, name string, repositoryScope v1alpha1.RepositoryScope, ) (err error) // RemoveOrganizationBaseRepositoryScope removes a base repository scope from an organization by ID. RemoveOrganizationBaseRepositoryScope( ctx context.Context, id string, repositoryScope v1alpha1.RepositoryScope, ) (err error) // RemoveOrganizationBaseRepositoryScopeByName removes a base repository scope from an organization by name. RemoveOrganizationBaseRepositoryScopeByName( ctx context.Context, name string, repositoryScope v1alpha1.RepositoryScope, ) (err error) }
OrganizationService is the Organization service. All methods on the Organization service require authentication.
type PushService ¶
type PushService interface { // Push pushes. Push( ctx context.Context, owner string, repository string, branch string, module *v1alpha1.Module, ) (localModulePin *v1alpha11.LocalModulePin, err error) }
PushService is the Push service.
type RepositoryBranchService ¶
type RepositoryBranchService interface { // CreateRepositoryBranch creates a new repository branch. CreateRepositoryBranch( ctx context.Context, repositoryId string, name string, parentBranch string, ) (repositoryBranch *v1alpha1.RepositoryBranch, err error) // ListRepositoryBranches lists the repository branches associated with a Repository. ListRepositoryBranches( ctx context.Context, repositoryId string, pageSize uint32, pageToken string, reverse bool, ) (repositoryBranches []*v1alpha1.RepositoryBranch, nextPageToken string, err error) }
RepositoryBranchService is the Repository branch service. All methods on the Repository branch service require authentication.
type RepositoryCommitService ¶
type RepositoryCommitService interface { // ListRepositoryCommits lists the repository commits associated with a repository branch. ListRepositoryCommits( ctx context.Context, repositoryId string, repositoryBranchName string, pageSize uint32, pageToken string, reverse bool, ) (repositoryCommits []*v1alpha1.RepositoryCommit, nextPageToken string, err error) }
RepositoryCommitService is the Repository commit service. All methods on the Repository commit service require authentication.
type RepositoryService ¶
type RepositoryService interface { // GetRepository gets a repository by ID. GetRepository(ctx context.Context, id string) (repository *v1alpha1.Repository, err error) // GetRepositoryByFullName gets a repository by full name. GetRepositoryByFullName(ctx context.Context, fullName string) (repository *v1alpha1.Repository, err error) // ListRepositories lists all repositories. ListRepositories( ctx context.Context, pageSize uint32, pageToken string, reverse bool, ) (repositories []*v1alpha1.Repository, nextPageToken string, err error) // ListUserRepositories lists all repositories belonging to a user. ListUserRepositories( ctx context.Context, userId string, pageSize uint32, pageToken string, reverse bool, ) (repositories []*v1alpha1.Repository, nextPageToken string, err error) // ListOrganizationRepositories lists all repositories for an organization. ListOrganizationRepositories( ctx context.Context, organizationId string, pageSize uint32, pageToken string, reverse bool, ) (repositories []*v1alpha1.Repository, nextPageToken string, err error) // CreateRepositoryByFullName creates a new repository by full name. CreateRepositoryByFullName( ctx context.Context, fullName string, visibility v1alpha1.Visibility, ) (repository *v1alpha1.Repository, err error) // UpdateRepositoryName updates a repository's name. UpdateRepositoryName( ctx context.Context, id string, newName string, ) (repository *v1alpha1.Repository, err error) // UpdateRepositoryNameByFullName updates a repository's name by full name. UpdateRepositoryNameByFullName( ctx context.Context, fullName string, newName string, ) (repository *v1alpha1.Repository, err error) // UpdateRepositoryVisibility updates a repository's visibility. UpdateRepositoryVisibility( ctx context.Context, id string, newVisibility v1alpha1.Visibility, ) (repository *v1alpha1.Repository, err error) // UpdateRepositoryVisibilityByName updates a repository's visibility by name. UpdateRepositoryVisibilityByName( ctx context.Context, ownerName string, repositoryName string, newVisibility v1alpha1.Visibility, ) (repository *v1alpha1.Repository, err error) // DeleteRepository deletes a repository. DeleteRepository(ctx context.Context, id string) (err error) // DeleteRepositoryByFullName deletes a repository by full name. DeleteRepositoryByFullName(ctx context.Context, fullName string) (err error) }
RepositoryService is the Repository service. All methods on the Repository service require authentication.
type ResolveService ¶
type ResolveService interface { // GetModulePins finds all the latest digests and respective dependencies of // the provided module references and picks a set of distinct modules pins. // // Note that module references with commits should still be passed to this function // to make sure this function can do dependency resolution. // // This function also deals with tiebreaking what ModulePin wins for the same repository. GetModulePins(ctx context.Context, moduleReferences []*v1alpha1.ModuleReference) (modulePins []*v1alpha1.ModulePin, err error) }
ResolveService is the resolve service.
This is the public service.
type UserService ¶
type UserService interface { // CreateUser creates a new user with the given username. CreateUser(ctx context.Context, username string) (user *v1alpha1.User, err error) // GetUser gets a user by ID. GetUser(ctx context.Context, id string) (user *v1alpha1.User, err error) // GetUserByUsername gets a user by username. GetUserByUsername(ctx context.Context, username string) (user *v1alpha1.User, err error) // ListUsers lists all users. ListUsers( ctx context.Context, pageSize uint32, pageToken string, reverse bool, ) (users []*v1alpha1.User, nextPageToken string, err error) // ListOrganizationUsers lists all users for an organization. ListOrganizationUsers( ctx context.Context, organizationId string, pageSize uint32, pageToken string, reverse bool, ) (users []*v1alpha1.User, nextPageToken string, err error) // UpdateUserUsername updates a user's username. UpdateUserUsername(ctx context.Context, newUsername string) (user *v1alpha1.User, err error) // DeleteUser deletes a user. DeleteUser(ctx context.Context) (err error) // AddUserOrganizationScope adds an organization scope for a specific organization to a user by ID. AddUserOrganizationScope( ctx context.Context, id string, organizationId string, organizationScope v1alpha1.OrganizationScope, ) (err error) // AddUserOrganizationScopeByName adds an organization scope for a specific organization to a user by name. AddUserOrganizationScopeByName( ctx context.Context, name string, organizationName string, organizationScope v1alpha1.OrganizationScope, ) (err error) // RemoveUserOrganizationScope removes an organization scope for a specific organization from a user by ID. RemoveUserOrganizationScope( ctx context.Context, id string, organizationId string, organizationScope v1alpha1.OrganizationScope, ) (err error) // RemoveUserOrganizationScopeByName removes an organization scope for a specific organization from a user by name. RemoveUserOrganizationScopeByName( ctx context.Context, name string, organizationName string, organizationScope v1alpha1.OrganizationScope, ) (err error) // AddUserServerScope adds a server scope for a user by ID. AddUserServerScope( ctx context.Context, id string, serverScope v1alpha1.ServerScope, ) (err error) // AddUserServerScopeByName adds a server scope for a user by name. AddUserServerScopeByName( ctx context.Context, name string, serverScope v1alpha1.ServerScope, ) (err error) // RemoveUserServerScope removes a server scope for a user by ID. RemoveUserServerScope( ctx context.Context, id string, serverScope v1alpha1.ServerScope, ) (err error) // RemoveUserServerScopeByName removes a server scope for a user by name. RemoveUserServerScopeByName( ctx context.Context, name string, serverScope v1alpha1.ServerScope, ) (err error) }
UserService is the User service.