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, reference 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.
type OwnerService ¶ added in v0.44.0
type OwnerService interface { // GetOwnerByName takes an owner name and returns the owner as // either a user or organization. GetOwnerByName(ctx context.Context, name string) (owner *v1alpha1.Owner, err error) }
OwnerService is a service that provides RPCs that allow the BSR to query for owner information.
type PluginService ¶ added in v0.45.0
type PluginService interface { // ListPlugins returns all the plugins available to the user. This includes // public plugins, those uploaded to organizations the user is part of, // and any plugins uploaded directly by the user. ListPlugins( ctx context.Context, pageSize uint32, pageToken string, reverse bool, ) (plugins []*v1alpha1.Plugin, nextPageToken string, err error) // ListUserPlugins lists all plugins belonging to a user. ListUserPlugins( ctx context.Context, owner string, pageSize uint32, pageToken string, reverse bool, ) (plugins []*v1alpha1.Plugin, nextPageToken string, err error) // ListOrganizationPlugins lists all plugins for an organization. ListOrganizationPlugins( ctx context.Context, organization string, pageSize uint32, pageToken string, reverse bool, ) (plugins []*v1alpha1.Plugin, nextPageToken string, err error) // ListPluginVersions lists all the versions available for the specified plugin. ListPluginVersions( ctx context.Context, owner string, name string, pageSize uint32, pageToken string, reverse bool, ) (pluginVersions []*v1alpha1.PluginVersion, nextPageToken string, err error) // CreatePlugin creates a new plugin. CreatePlugin( ctx context.Context, owner string, name string, visibility v1alpha1.PluginVisibility, ) (plugin *v1alpha1.Plugin, err error) // GetPlugin returns the plugin, if found. GetPlugin( ctx context.Context, owner string, name string, ) (plugin *v1alpha1.Plugin, err error) // DeletePlugin deletes the plugin, if it exists. Note that deleting // a plugin may cause breaking changes for templates using that plugin, // and should be done with extreme care. DeletePlugin( ctx context.Context, owner string, name string, ) (err error) // GetTemplate returns the template, if found. GetTemplate( ctx context.Context, owner string, name string, ) (template *v1alpha1.Template, err error) // ListTemplates returns all the templates available to the user. This includes // public templates, those owned by organizations the user is part of, // and any created directly by the user. ListTemplates( ctx context.Context, pageSize uint32, pageToken string, reverse bool, ) (templates []*v1alpha1.Template, nextPageToken string, err error) // ListUserPlugins lists all templates belonging to a user. ListUserTemplates( ctx context.Context, owner string, pageSize uint32, pageToken string, reverse bool, ) (templates []*v1alpha1.Template, nextPageToken string, err error) // ListOrganizationTemplates lists all templates for an organization. ListOrganizationTemplates( ctx context.Context, organization string, pageSize uint32, pageToken string, reverse bool, ) (templates []*v1alpha1.Template, nextPageToken string, err error) // GetTemplateVersion returns the template version, if found. GetTemplateVersion( ctx context.Context, owner string, name string, version string, ) (templateVersion *v1alpha1.TemplateVersion, err error) // ListTemplateVersions lists all the template versions available for the specified template. ListTemplateVersions( ctx context.Context, owner string, name string, pageSize uint32, pageToken string, reverse bool, ) (templateVersions []*v1alpha1.TemplateVersion, nextPageToken string, err error) // CreateTemplate creates a new template. CreateTemplate( ctx context.Context, owner string, name string, visibility v1alpha1.PluginVisibility, pluginConfigs []*v1alpha1.PluginConfig, ) (template *v1alpha1.Template, err error) // DeleteTemplate deletes the template, if it exists. DeleteTemplate( ctx context.Context, owner string, name string, ) (err error) // CreateTemplateVersion creates a new template version. CreateTemplateVersion( ctx context.Context, name string, templateOwner string, templateName string, pluginVersions []*v1alpha1.PluginVersionMapping, ) (templateVersion *v1alpha1.TemplateVersion, err error) }
PluginService manages plugins.
type PushService ¶
type PushService interface { // Push pushes. Push( ctx context.Context, owner string, repository string, branch string, module *v1alpha1.Module, tags []string, ) (localModulePin *v1alpha11.LocalModulePin, err error) }
PushService is the Push service.
type ReferenceService ¶ added in v0.44.0
type ReferenceService interface { // GetReferenceByName takes a reference name and returns the // reference either as a tag, branch, or commit. GetReferenceByName( ctx context.Context, name string, owner string, repositoryName string, ) (reference *v1alpha1.Reference, err error) }
ReferenceService is a service that provides RPCs that allow the BSR to query for reference information.
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.
type RepositoryCommitService ¶
type RepositoryCommitService interface { // ListRepositoryCommitsByBranch lists the repository commits associated // with a repository branch on a repository, ordered by their create time. ListRepositoryCommitsByBranch( ctx context.Context, repositoryOwner string, repositoryName string, repositoryBranchName string, pageSize uint32, pageToken string, reverse bool, ) (repositoryCommits []*v1alpha1.RepositoryCommit, nextPageToken string, err error) // ListRepositoryCommitsByReference returns repository commits up-to and including // the provided reference. ListRepositoryCommitsByReference( ctx context.Context, repositoryOwner string, repositoryName string, reference string, pageSize uint32, pageToken string, reverse bool, ) (repositoryCommits []*v1alpha1.RepositoryCommit, nextPageToken string, err error) // GetRepositoryCommitByReference returns the repository commit matching // the provided reference, if it exists. GetRepositoryCommitByReference( ctx context.Context, repositoryOwner string, repositoryName string, reference string, ) (repositoryCommit *v1alpha1.RepositoryCommit, err error) // GetRepositoryCommitBySequenceID returns the repository commit matching // the provided sequence ID and branch, if it exists. GetRepositoryCommitBySequenceID( ctx context.Context, repositoryOwner string, repositoryName string, repositoryBranchName string, commitSequenceId int64, ) (repositoryCommit *v1alpha1.RepositoryCommit, err error) }
RepositoryCommitService is the Repository commit service.
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) // ListUserRepositories lists all repositories a user can access. ListRepositoriesUserCanAccess( ctx context.Context, 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.
type RepositoryTagService ¶ added in v0.39.1
type RepositoryTagService interface { // CreateRepositoryTag creates a new repository tag. CreateRepositoryTag( ctx context.Context, repositoryId string, name string, commitName string, ) (repositoryTag *v1alpha1.RepositoryTag, err error) // ListRepositoryTags lists the repository tags associated with a Repository. ListRepositoryTags( ctx context.Context, repositoryId string, pageSize uint32, pageToken string, reverse bool, ) (repositoryTags []*v1alpha1.RepositoryTag, nextPageToken string, err error) }
RepositoryTagService is the Repository tag service.
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, currentModulePins []*v1alpha1.ModulePin, ) (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.