Documentation
¶
Index ¶
- func FormatFileSystemLabel(fs *openv1alpha1resource.FileSystem) string
- func FormatRegion(region string) string
- type ActionInterface
- type ContainerRegistryInterface
- type CreateProjectOptions
- type CreateProjectUsingTemplateOptions
- type CustomFieldInterface
- type EventInterface
- type FileInterface
- type FileSystemInterface
- type LabelInterface
- type ListActionRunsOptions
- type ListActionsOptions
- type ListProjectsOptions
- type ListRolesOptions
- type ListRolesResult
- type ListUsersOptions
- type ListUsersResult
- type Moment
- type OrganizationInterface
- type ProjectInterface
- type RecordInterface
- type RoleInterface
- type SearchRecordsOptions
- type SearchRecordsResult
- type SecurityTokenInterface
- type TaskInterface
- type UserInterface
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func FormatFileSystemLabel ¶ added in v1.5.0
func FormatFileSystemLabel(fs *openv1alpha1resource.FileSystem) string
FormatFileSystemLabel returns a human-readable label like "cn-hangzhou - Default [default]".
func FormatRegion ¶ added in v1.5.0
FormatRegion returns a human-readable region string.
Types ¶
type ActionInterface ¶
type ActionInterface interface {
// GetByName gets an action by name.
GetByName(ctx context.Context, actionName *name.Action) (*openv1alpha1resource.Action, error)
// ListAllActions lists all actions in the current organization.
ListAllActions(ctx context.Context, listOpts *ListActionsOptions) ([]*openv1alpha1resource.Action, error)
// CreateActionRun creates an action run.
CreateActionRun(ctx context.Context, action *openv1alpha1resource.Action, record *name.Record) error
// ListAllActionRuns lists all action runs in the current organization.
ListAllActionRuns(ctx context.Context, listOpts *ListActionRunsOptions) ([]*openv1alpha1resource.ActionRun, error)
// ActionId2Name converts an action id or name to an action name.
ActionId2Name(ctx context.Context, actionIdOrName string, projectNameStr *name.Project) (*name.Action, error)
}
func NewActionClient ¶
func NewActionClient( actionServiceClient openv1alpha1connect.ActionServiceClient, actionRunServiceClient openv1alpha1connect.ActionRunServiceClient, ) ActionInterface
type ContainerRegistryInterface ¶ added in v1.4.0
type ContainerRegistryInterface interface {
// CreateBasicCredential creates a basic docker credential (username+password).
CreateBasicCredential(ctx context.Context) (*openv1alpha1service.BasicCredential, error)
}
ContainerRegistryInterface defines APIs for container registry operations.
func NewContainerRegistryClient ¶ added in v1.4.0
func NewContainerRegistryClient(cli openv1alpha1connect.ContainerRegistryServiceClient) ContainerRegistryInterface
NewContainerRegistryClient creates a new container registry client.
type CreateProjectOptions ¶ added in v1.4.0
type CreateProjectUsingTemplateOptions ¶ added in v1.4.0
type CreateProjectUsingTemplateOptions struct {
Parent string
Slug string
DisplayName string
ProjectTemplate string
TemplateScopes []openv1alpha1service.CreateProjectUsingTemplateRequest_TemplateScope
Visibility enums.ProjectVisibilityEnum_ProjectVisibility
Description string
}
type CustomFieldInterface ¶ added in v1.6.0
type CustomFieldInterface interface {
GetRecordCustomFieldSchema(ctx context.Context, project *name.Project) (*commons.CustomFieldSchema, error)
}
func NewCustomFieldClient ¶ added in v1.6.0
func NewCustomFieldClient(client openv1alpha1connect.CustomFieldServiceClient) CustomFieldInterface
type EventInterface ¶ added in v1.1.5
type EventInterface interface {
// ObtainEvent creates an event if not found, fetches otherwise.
ObtainEvent(ctx context.Context, parent string, event *openv1alpha1resource.Event) (*openv1alpha1service.ObtainEventResponse, error)
}
func NewEventClient ¶ added in v1.1.5
func NewEventClient(eventServiceClient openv1alpha1connect.EventServiceClient) EventInterface
type FileInterface ¶
type FileInterface interface {
// GetFile gets a file by name.
GetFile(ctx context.Context, fileResourceName string) (*openv1alpha1resource.File, error)
// GenerateFileUploadUrls generates pre-signed URLs for file uploads.
GenerateFileUploadUrls(ctx context.Context, parent string, files []*openv1alpha1resource.File) (map[string]string, error)
// GenerateFileDownloadUrl generates a pre-signed URL for file download.
GenerateFileDownloadUrl(ctx context.Context, fileResourceName string) (string, error)
// DeleteFile deletes a file by name.
DeleteFile(ctx context.Context, fileResourceName string) error
// BatchDeleteFiles deletes multiple files under a parent.
BatchDeleteFiles(ctx context.Context, parent string, names []string) error
}
func NewFileClient ¶
func NewFileClient(fileServiceClient openv1alpha1connect.FileServiceClient) FileInterface
type FileSystemInterface ¶ added in v1.5.0
type FileSystemInterface interface {
ListAllFileSystems(ctx context.Context) ([]*openv1alpha1resource.FileSystem, error)
}
func NewFileSystemClient ¶ added in v1.5.0
func NewFileSystemClient(fileSystemServiceClient openv1alpha1connect.FileSystemServiceClient) FileSystemInterface
type LabelInterface ¶
type LabelInterface interface {
// GetByDisplayNameOrCreate gets a label by display name, creates it if not found.
GetByDisplayNameOrCreate(ctx context.Context, displayName string, projectName *name.Project) (*openv1alpha1resource.Label, error)
}
func NewLabelClient ¶
func NewLabelClient(labelServiceClient openv1alpha1connect.LabelServiceClient) LabelInterface
type ListActionRunsOptions ¶
type ListActionsOptions ¶
type ListActionsOptions struct {
Parent string
}
type ListProjectsOptions ¶
type ListRolesOptions ¶ added in v1.5.0
type ListRolesResult ¶ added in v1.5.0
type ListRolesResult struct {
Roles []*openv1alpha1resource.Role
NextPageToken string
TotalSize int64
}
type ListUsersOptions ¶ added in v1.5.0
type ListUsersResult ¶ added in v1.5.0
type ListUsersResult struct {
Users []*openv1alpha1resource.User
NextPageToken string
TotalSize int64
}
type OrganizationInterface ¶
type OrganizationInterface interface {
// Slug get org slug.
Slug(ctx context.Context, org *name.Organization) (string, error)
}
func NewOrganizationClient ¶
func NewOrganizationClient(organizationServiceClient openv1alpha1connect.OrganizationServiceClient) OrganizationInterface
type ProjectInterface ¶
type ProjectInterface interface {
// Name gets the project resource name from the project slug.
Name(ctx context.Context, projectSlug string) (*name.Project, error)
// Get gets a project by name.
Get(ctx context.Context, projectName *name.Project) (*openv1alpha1resource.Project, error)
// ListAllUserProjects lists all projects in the current organization.
ListAllUserProjects(ctx context.Context, listOpts *ListProjectsOptions) ([]*openv1alpha1resource.Project, error)
// ListProjectsWithPagination lists projects with pagination.
ListProjectsWithPagination(ctx context.Context, pageSize int, skip int, listOpts *ListProjectsOptions) ([]*openv1alpha1resource.Project, error)
// CreateProject creates a project.
CreateProject(ctx context.Context, opts *CreateProjectOptions) (*openv1alpha1resource.Project, error)
// CreateProjectUsingTemplate creates a project using a template.
CreateProjectUsingTemplate(ctx context.Context, opts *CreateProjectUsingTemplateOptions) (*openv1alpha1resource.Project, error)
// ListAllFiles lists all files in a project.
ListAllFiles(ctx context.Context, projectName *name.Project) ([]*openv1alpha1resource.File, error)
// ListAllFilesWithFilter lists all files in a project with additional filter.
ListAllFilesWithFilter(ctx context.Context, projectName *name.Project, additionalFilter string) ([]*openv1alpha1resource.File, error)
// ListFilesWithPagination lists files in a project with pagination support.
ListFilesWithPagination(ctx context.Context, projectName *name.Project, pageSize int, skip int) ([]*openv1alpha1resource.File, error)
// ListFilesWithPaginationAndFilter lists files in a project with pagination support and additional filter.
ListFilesWithPaginationAndFilter(ctx context.Context, projectName *name.Project, pageSize int, skip int, additionalFilter string) ([]*openv1alpha1resource.File, error)
}
func NewProjectClient ¶
func NewProjectClient(projectServiceClient openv1alpha1connect.ProjectServiceClient, fileServiceClient openv1alpha1connect.FileServiceClient) ProjectInterface
type RecordInterface ¶
type RecordInterface interface {
// Get gets a record by name.
Get(ctx context.Context, recordName *name.Record) (*openv1alpha1resource.Record, error)
// Create creates a record.
Create(ctx context.Context, parent *name.Project, title string, deviceNameStr string, description string, labelDisplayNames []*openv1alpha1resource.Label, customFieldValues []*commons.CustomFieldValue) (*openv1alpha1resource.Record, error)
// Copy copies a record to target project.
Copy(ctx context.Context, recordName *name.Record, targetProjectName *name.Project) (*openv1alpha1resource.Record, error)
// Move moves a record to target project.
Move(ctx context.Context, recordName *name.Record, targetProjectName *name.Project) (*openv1alpha1resource.Record, error)
// CopyFiles copies files from src record to dst record.
CopyFiles(ctx context.Context, srcRecordName *name.Record, dstRecordName *name.Record, files []*openv1alpha1resource.File) error
// MoveFiles moves files from src record to dst record.
MoveFiles(ctx context.Context, srcRecordName *name.Record, dstRecordName *name.Record, files []*openv1alpha1resource.File) error
// ListAllFiles lists all files in a record.
ListAllFiles(ctx context.Context, recordName *name.Record) ([]*openv1alpha1resource.File, error)
// ListAllFilesWithFilter lists all files in a record with additional filter.
ListAllFilesWithFilter(ctx context.Context, recordName *name.Record, additionalFilter string) ([]*openv1alpha1resource.File, error)
// ListFilesWithPagination lists files in a record with pagination support.
ListFilesWithPagination(ctx context.Context, recordName *name.Record, pageSize int, skip int) ([]*openv1alpha1resource.File, error)
// ListFilesWithPaginationAndFilter lists files in a record with pagination support and additional filter.
ListFilesWithPaginationAndFilter(ctx context.Context, recordName *name.Record, pageSize int, skip int, additionalFilter string) ([]*openv1alpha1resource.File, error)
// Delete deletes a record by name.
Delete(ctx context.Context, recordName *name.Record) error
// DeleteFile deletes a file by name.
DeleteFile(ctx context.Context, recordName *name.Record, fileName string) error
// Update updates a record.
Update(ctx context.Context, recordName *name.Record, title string, description string, labels []*openv1alpha1resource.Label, customFieldValues []*commons.CustomFieldValue, fieldMask []string) error
// ListAllEvents lists all events in a record.
ListAllEvents(ctx context.Context, recordName *name.Record) ([]*openv1alpha1resource.Event, error)
// ListAllMoments lists all moments in a record.
ListAllMoments(ctx context.Context, recordName *name.Record) ([]*Moment, error)
// SearchAll searches all records in a project using the new SearchRecords API.
SearchAll(ctx context.Context, options *SearchRecordsOptions) ([]*openv1alpha1resource.Record, error)
// SearchWithPageToken searches records with page token support (new API).
SearchWithPageToken(ctx context.Context, options *SearchRecordsOptions) (*SearchRecordsResult, error)
// GenerateRecordThumbnailUploadUrl generates a pre-signed URL for uploading a record thumbnail.
GenerateRecordThumbnailUploadUrl(ctx context.Context, recordName *name.Record) (string, error)
// RecordId2Name converts a record id or name to a record name.
RecordId2Name(ctx context.Context, recordIdOrName string, projectNameStr *name.Project) (*name.Record, error)
}
func NewRecordClient ¶
func NewRecordClient(recordServiceClient openv1alpha1connect.RecordServiceClient, fileServiceClient openv1alpha1connect.FileServiceClient, userServiceClient openv1alpha1connect.UserServiceClient, labelServiceClient openv1alpha1connect.LabelServiceClient) RecordInterface
type RoleInterface ¶ added in v1.5.0
type RoleInterface interface {
ListRoles(ctx context.Context, opts *ListRolesOptions) (*ListRolesResult, error)
}
func NewRoleClient ¶ added in v1.5.0
func NewRoleClient(roleServiceClient openv1alpha1connect.RoleServiceClient) RoleInterface
type SearchRecordsOptions ¶ added in v1.4.6
type SearchRecordsResult ¶ added in v1.4.6
type SearchRecordsResult struct {
Records []*openv1alpha1resource.Record
NextPageToken string
TotalSize int64
}
type SecurityTokenInterface ¶
type SecurityTokenInterface interface {
GenerateSecurityToken(ctx context.Context, project string) (*openDssv1alphaservice.GenerateSecurityTokenResponse, error)
}
func NewSecurityTokenClient ¶
func NewSecurityTokenClient(securityTokenServiceClient openDssv1alphaconnect.SecurityTokenServiceClient) SecurityTokenInterface
type TaskInterface ¶ added in v1.1.5
type TaskInterface interface {
UpsertTask(ctx context.Context, parent string, task *openv1alpha1resource.Task) (*openv1alpha1resource.Task, error)
SyncTask(ctx context.Context, taskName string) (*openv1alpha1resource.Task, error)
}
func NewTaskClient ¶ added in v1.1.5
func NewTaskClient(taskServiceClient openv1alpha1connect.TaskServiceClient) TaskInterface
type UserInterface ¶
type UserInterface interface {
BatchGetUsers(ctx context.Context, userNameList mapset.Set[name.User]) (map[string]*openv1alpha1resource.User, error)
ListUsers(ctx context.Context, opts *ListUsersOptions) (*ListUsersResult, error)
GetUser(ctx context.Context, userName string) (*openv1alpha1resource.User, error)
FindUsersByNickname(ctx context.Context, nickname string) ([]*openv1alpha1resource.User, error)
}
func NewUserClient ¶
func NewUserClient(userServiceClient openv1alpha1connect.UserServiceClient) UserInterface
Source Files
¶
Click to show internal directories.
Click to hide internal directories.