Documentation ¶
Index ¶
- Constants
- func MakeEndpointOfCreateRepository(s Mirror) endpoint.Endpoint
- func MakeEndpointOfDeleteRepository(s Mirror) endpoint.Endpoint
- func MakeEndpointOfDeleteRepositoryFile(s Mirror) endpoint.Endpoint
- func MakeEndpointOfDeleteRepositoryFilesByMode(s Mirror) endpoint.Endpoint
- func MakeEndpointOfGenerateRepository(s Mirror) endpoint.Endpoint
- func MakeEndpointOfGetRepository(s Mirror) endpoint.Endpoint
- func MakeEndpointOfGetRepositoryFile(s Mirror) endpoint.Endpoint
- func MakeEndpointOfGetRepositoryFileCount(s Mirror) endpoint.Endpoint
- func MakeEndpointOfGetRepositorySyncPlan(s Mirror) endpoint.Endpoint
- func MakeEndpointOfGetRepositorySyncStatus(s Mirror) endpoint.Endpoint
- func MakeEndpointOfListRepositoryFiles(s Mirror) endpoint.Endpoint
- func MakeEndpointOfListRepositoryLogs(s Mirror) endpoint.Endpoint
- func MakeEndpointOfSyncRepository(s Mirror) endpoint.Endpoint
- func MakeEndpointOfSyncRepositoryWithConfig(s Mirror) endpoint.Endpoint
- func MakeEndpointOfUpdateRepository(s Mirror) endpoint.Endpoint
- func NewHTTPRouter(svc Mirror, codecs httpcodec.Codecs, opts ...httpoption.Option) chi.Router
- func OASv2APIDoc(schema oas2.Schema) string
- func RepositoryMatch(repository string) bool
- func ValidateCreateRepositoryRequest(newSchema func(*CreateRepositoryRequest) validating.Schema) httpoption.Validator
- func ValidateDeleteRepositoryFileRequest(newSchema func(*DeleteRepositoryFileRequest) validating.Schema) httpoption.Validator
- func ValidateDeleteRepositoryFilesByModeRequest(newSchema func(*DeleteRepositoryFilesByModeRequest) validating.Schema) httpoption.Validator
- func ValidateDeleteRepositoryRequest(newSchema func(*DeleteRepositoryRequest) validating.Schema) httpoption.Validator
- func ValidateGenerateRepositoryRequest(newSchema func(*GenerateRepositoryRequest) validating.Schema) httpoption.Validator
- func ValidateGetRepositoryFileCountRequest(newSchema func(*GetRepositoryFileCountRequest) validating.Schema) httpoption.Validator
- func ValidateGetRepositoryFileRequest(newSchema func(*GetRepositoryFileRequest) validating.Schema) httpoption.Validator
- func ValidateGetRepositoryRequest(newSchema func(*GetRepositoryRequest) validating.Schema) httpoption.Validator
- func ValidateGetRepositorySyncPlanRequest(newSchema func(*GetRepositorySyncPlanRequest) validating.Schema) httpoption.Validator
- func ValidateGetRepositorySyncStatusRequest(newSchema func(*GetRepositorySyncStatusRequest) validating.Schema) httpoption.Validator
- func ValidateListRepositoryFilesRequest(newSchema func(*ListRepositoryFilesRequest) validating.Schema) httpoption.Validator
- func ValidateListRepositoryLogsRequest(newSchema func(*ListRepositoryLogsRequest) validating.Schema) httpoption.Validator
- func ValidateSyncRepositoryRequest(newSchema func(*SyncRepositoryRequest) validating.Schema) httpoption.Validator
- func ValidateSyncRepositoryWithConfigRequest(newSchema func(*SyncRepositoryWithConfigRequest) validating.Schema) httpoption.Validator
- func ValidateUpdateRepositoryRequest(newSchema func(*UpdateRepositoryRequest) validating.Schema) httpoption.Validator
- type CreateRepositoryRequest
- type CreateRepositoryResponse
- type DeleteRepositoryFileRequest
- type DeleteRepositoryFileResponse
- type DeleteRepositoryFilesByModeRequest
- type DeleteRepositoryFilesByModeResponse
- type DeleteRepositoryRequest
- type DeleteRepositoryResponse
- type GenerateRepositoryRequest
- type GenerateRepositoryResponse
- type GetRepositoryFileCountRequest
- type GetRepositoryFileCountResponse
- type GetRepositoryFileRequest
- type GetRepositoryFileResponse
- type GetRepositoryRequest
- type GetRepositoryResponse
- type GetRepositorySyncPlanRequest
- type GetRepositorySyncPlanResponse
- type GetRepositorySyncStatusRequest
- type GetRepositorySyncStatusResponse
- type HTTPClient
- func (c *HTTPClient) CreateRepository(ctx context.Context, repository string, properties *RepositoryProperties) (err error)
- func (c *HTTPClient) DeleteRepository(ctx context.Context, repository string, deleteFiles bool) (err error)
- func (c *HTTPClient) DeleteRepositoryFile(ctx context.Context, repository string, file string) (err error)
- func (c *HTTPClient) DeleteRepositoryFilesByMode(ctx context.Context, repository string, mode uint32) (err error)
- func (c *HTTPClient) GenerateRepository(ctx context.Context, repository string) (err error)
- func (c *HTTPClient) GetRepository(ctx context.Context, repository string) (properties *RepositoryProperties, err error)
- func (c *HTTPClient) GetRepositoryFile(ctx context.Context, repository string, file string) (repositoryFile *RepositoryFile, err error)
- func (c *HTTPClient) GetRepositoryFileCount(ctx context.Context, repository string) (count int, err error)
- func (c *HTTPClient) GetRepositorySyncPlan(ctx context.Context, repository string) (syncPlan *RepositorySyncPlan, err error)
- func (c *HTTPClient) GetRepositorySyncStatus(ctx context.Context, repository string) (syncStatus *SyncStatus, err error)
- func (c *HTTPClient) ListRepositoryFiles(ctx context.Context, repository string, page *Page) (repositoryFiles []*RepositoryFile, err error)
- func (c *HTTPClient) ListRepositoryLogs(ctx context.Context, repository string, page *Page) (logs []RepositoryLog, err error)
- func (c *HTTPClient) SyncRepository(ctx context.Context, repository string, wait bool) (err error)
- func (c *HTTPClient) SyncRepositoryWithConfig(ctx context.Context, repository string, mirrorConfigs []MirrorConfig, ...) (err error)
- func (c *HTTPClient) UpdateRepository(ctx context.Context, repository string, properties *RepositoryProperties) (err error)
- type ListRepositoryFilesRequest
- type ListRepositoryFilesResponse
- type ListRepositoryLogsRequest
- type ListRepositoryLogsResponse
- type Mirror
- type MirrorConfig
- type Page
- type RepositoryFile
- type RepositoryLog
- type RepositoryProperties
- type RepositorySyncPlan
- type SyncRepositoryRequest
- type SyncRepositoryResponse
- type SyncRepositoryWithConfigRequest
- type SyncRepositoryWithConfigResponse
- type SyncStatus
- type UpdateRepositoryRequest
- type UpdateRepositoryResponse
- type WebConfig
Constants ¶
const ( RepositoryRegex = "^(artifacts/mirror/[a-z0-9]+(?:[._-][a-z0-9]+)*)$" URLPath = "/artifacts/mirror/api/v1" )
Variables ¶
This section is empty.
Functions ¶
func MakeEndpointOfCreateRepository ¶
MakeEndpointOfCreateRepository creates the endpoint for s.CreateRepository.
func MakeEndpointOfDeleteRepository ¶
MakeEndpointOfDeleteRepository creates the endpoint for s.DeleteRepository.
func MakeEndpointOfDeleteRepositoryFile ¶ added in v0.0.32
MakeEndpointOfDeleteRepositoryFile creates the endpoint for s.DeleteRepositoryFile.
func MakeEndpointOfDeleteRepositoryFilesByMode ¶ added in v0.0.35
MakeEndpointOfDeleteRepositoryFilesByMode creates the endpoint for s.DeleteRepositoryFilesByMode.
func MakeEndpointOfGenerateRepository ¶ added in v0.0.32
MakeEndpointOfGenerateRepository creates the endpoint for s.GenerateRepository.
func MakeEndpointOfGetRepository ¶
MakeEndpointOfGetRepository creates the endpoint for s.GetRepository.
func MakeEndpointOfGetRepositoryFile ¶
MakeEndpointOfGetRepositoryFile creates the endpoint for s.GetRepositoryFile.
func MakeEndpointOfGetRepositoryFileCount ¶ added in v0.0.32
MakeEndpointOfGetRepositoryFileCount creates the endpoint for s.GetRepositoryFileCount.
func MakeEndpointOfGetRepositorySyncPlan ¶ added in v0.0.32
MakeEndpointOfGetRepositorySyncPlan creates the endpoint for s.GetRepositorySyncPlan.
func MakeEndpointOfGetRepositorySyncStatus ¶
MakeEndpointOfGetRepositorySyncStatus creates the endpoint for s.GetRepositorySyncStatus.
func MakeEndpointOfListRepositoryFiles ¶
MakeEndpointOfListRepositoryFiles creates the endpoint for s.ListRepositoryFiles.
func MakeEndpointOfListRepositoryLogs ¶
MakeEndpointOfListRepositoryLogs creates the endpoint for s.ListRepositoryLogs.
func MakeEndpointOfSyncRepository ¶
MakeEndpointOfSyncRepository creates the endpoint for s.SyncRepository.
func MakeEndpointOfSyncRepositoryWithConfig ¶ added in v0.0.34
MakeEndpointOfSyncRepositoryWithConfig creates the endpoint for s.SyncRepositoryWithConfig.
func MakeEndpointOfUpdateRepository ¶
MakeEndpointOfUpdateRepository creates the endpoint for s.UpdateRepository.
func NewHTTPRouter ¶
func OASv2APIDoc ¶
func RepositoryMatch ¶
func ValidateCreateRepositoryRequest ¶
func ValidateCreateRepositoryRequest(newSchema func(*CreateRepositoryRequest) validating.Schema) httpoption.Validator
ValidateCreateRepositoryRequest creates a validator for CreateRepositoryRequest.
func ValidateDeleteRepositoryFileRequest ¶ added in v0.0.32
func ValidateDeleteRepositoryFileRequest(newSchema func(*DeleteRepositoryFileRequest) validating.Schema) httpoption.Validator
ValidateDeleteRepositoryFileRequest creates a validator for DeleteRepositoryFileRequest.
func ValidateDeleteRepositoryFilesByModeRequest ¶ added in v0.0.35
func ValidateDeleteRepositoryFilesByModeRequest(newSchema func(*DeleteRepositoryFilesByModeRequest) validating.Schema) httpoption.Validator
ValidateDeleteRepositoryFilesByModeRequest creates a validator for DeleteRepositoryFilesByModeRequest.
func ValidateDeleteRepositoryRequest ¶
func ValidateDeleteRepositoryRequest(newSchema func(*DeleteRepositoryRequest) validating.Schema) httpoption.Validator
ValidateDeleteRepositoryRequest creates a validator for DeleteRepositoryRequest.
func ValidateGenerateRepositoryRequest ¶ added in v0.0.32
func ValidateGenerateRepositoryRequest(newSchema func(*GenerateRepositoryRequest) validating.Schema) httpoption.Validator
ValidateGenerateRepositoryRequest creates a validator for GenerateRepositoryRequest.
func ValidateGetRepositoryFileCountRequest ¶ added in v0.0.32
func ValidateGetRepositoryFileCountRequest(newSchema func(*GetRepositoryFileCountRequest) validating.Schema) httpoption.Validator
ValidateGetRepositoryFileCountRequest creates a validator for GetRepositoryFileCountRequest.
func ValidateGetRepositoryFileRequest ¶
func ValidateGetRepositoryFileRequest(newSchema func(*GetRepositoryFileRequest) validating.Schema) httpoption.Validator
ValidateGetRepositoryFileRequest creates a validator for GetRepositoryFileRequest.
func ValidateGetRepositoryRequest ¶
func ValidateGetRepositoryRequest(newSchema func(*GetRepositoryRequest) validating.Schema) httpoption.Validator
ValidateGetRepositoryRequest creates a validator for GetRepositoryRequest.
func ValidateGetRepositorySyncPlanRequest ¶ added in v0.0.32
func ValidateGetRepositorySyncPlanRequest(newSchema func(*GetRepositorySyncPlanRequest) validating.Schema) httpoption.Validator
ValidateGetRepositorySyncPlanRequest creates a validator for GetRepositorySyncPlanRequest.
func ValidateGetRepositorySyncStatusRequest ¶
func ValidateGetRepositorySyncStatusRequest(newSchema func(*GetRepositorySyncStatusRequest) validating.Schema) httpoption.Validator
ValidateGetRepositorySyncStatusRequest creates a validator for GetRepositorySyncStatusRequest.
func ValidateListRepositoryFilesRequest ¶
func ValidateListRepositoryFilesRequest(newSchema func(*ListRepositoryFilesRequest) validating.Schema) httpoption.Validator
ValidateListRepositoryFilesRequest creates a validator for ListRepositoryFilesRequest.
func ValidateListRepositoryLogsRequest ¶
func ValidateListRepositoryLogsRequest(newSchema func(*ListRepositoryLogsRequest) validating.Schema) httpoption.Validator
ValidateListRepositoryLogsRequest creates a validator for ListRepositoryLogsRequest.
func ValidateSyncRepositoryRequest ¶
func ValidateSyncRepositoryRequest(newSchema func(*SyncRepositoryRequest) validating.Schema) httpoption.Validator
ValidateSyncRepositoryRequest creates a validator for SyncRepositoryRequest.
func ValidateSyncRepositoryWithConfigRequest ¶ added in v0.0.34
func ValidateSyncRepositoryWithConfigRequest(newSchema func(*SyncRepositoryWithConfigRequest) validating.Schema) httpoption.Validator
ValidateSyncRepositoryWithConfigRequest creates a validator for SyncRepositoryWithConfigRequest.
func ValidateUpdateRepositoryRequest ¶
func ValidateUpdateRepositoryRequest(newSchema func(*UpdateRepositoryRequest) validating.Schema) httpoption.Validator
ValidateUpdateRepositoryRequest creates a validator for UpdateRepositoryRequest.
Types ¶
type CreateRepositoryRequest ¶
type CreateRepositoryRequest struct { Repository string `json:"repository"` Properties *RepositoryProperties `json:"properties"` }
type CreateRepositoryResponse ¶
type CreateRepositoryResponse struct {
Err error `json:"-"`
}
func (*CreateRepositoryResponse) Body ¶
func (r *CreateRepositoryResponse) Body() interface{}
func (*CreateRepositoryResponse) Failed ¶
func (r *CreateRepositoryResponse) Failed() error
Failed implements endpoint.Failer.
type DeleteRepositoryFileRequest ¶ added in v0.0.32
type DeleteRepositoryFileResponse ¶ added in v0.0.32
type DeleteRepositoryFileResponse struct {
Err error `json:"-"`
}
func (*DeleteRepositoryFileResponse) Body ¶ added in v0.0.32
func (r *DeleteRepositoryFileResponse) Body() interface{}
func (*DeleteRepositoryFileResponse) Failed ¶ added in v0.0.32
func (r *DeleteRepositoryFileResponse) Failed() error
Failed implements endpoint.Failer.
type DeleteRepositoryFilesByModeRequest ¶ added in v0.0.35
type DeleteRepositoryFilesByModeResponse ¶ added in v0.0.35
type DeleteRepositoryFilesByModeResponse struct {
Err error `json:"-"`
}
func (*DeleteRepositoryFilesByModeResponse) Body ¶ added in v0.0.35
func (r *DeleteRepositoryFilesByModeResponse) Body() interface{}
func (*DeleteRepositoryFilesByModeResponse) Failed ¶ added in v0.0.35
func (r *DeleteRepositoryFilesByModeResponse) Failed() error
Failed implements endpoint.Failer.
type DeleteRepositoryRequest ¶
type DeleteRepositoryResponse ¶
type DeleteRepositoryResponse struct {
Err error `json:"-"`
}
func (*DeleteRepositoryResponse) Body ¶
func (r *DeleteRepositoryResponse) Body() interface{}
func (*DeleteRepositoryResponse) Failed ¶
func (r *DeleteRepositoryResponse) Failed() error
Failed implements endpoint.Failer.
type GenerateRepositoryRequest ¶ added in v0.0.32
type GenerateRepositoryRequest struct {
Repository string `json:"repository"`
}
type GenerateRepositoryResponse ¶ added in v0.0.32
type GenerateRepositoryResponse struct {
Err error `json:"-"`
}
func (*GenerateRepositoryResponse) Body ¶ added in v0.0.32
func (r *GenerateRepositoryResponse) Body() interface{}
func (*GenerateRepositoryResponse) Failed ¶ added in v0.0.32
func (r *GenerateRepositoryResponse) Failed() error
Failed implements endpoint.Failer.
type GetRepositoryFileCountRequest ¶ added in v0.0.32
type GetRepositoryFileCountRequest struct {
Repository string `json:"repository"`
}
type GetRepositoryFileCountResponse ¶ added in v0.0.32
func (*GetRepositoryFileCountResponse) Body ¶ added in v0.0.32
func (r *GetRepositoryFileCountResponse) Body() interface{}
func (*GetRepositoryFileCountResponse) Failed ¶ added in v0.0.32
func (r *GetRepositoryFileCountResponse) Failed() error
Failed implements endpoint.Failer.
type GetRepositoryFileResponse ¶
type GetRepositoryFileResponse struct { RepositoryFile *RepositoryFile `json:"repository_file"` Err error `json:"-"` }
func (*GetRepositoryFileResponse) Body ¶
func (r *GetRepositoryFileResponse) Body() interface{}
func (*GetRepositoryFileResponse) Failed ¶
func (r *GetRepositoryFileResponse) Failed() error
Failed implements endpoint.Failer.
type GetRepositoryRequest ¶
type GetRepositoryRequest struct {
Repository string `json:"repository"`
}
type GetRepositoryResponse ¶
type GetRepositoryResponse struct { Properties *RepositoryProperties `json:"properties"` Err error `json:"-"` }
func (*GetRepositoryResponse) Body ¶
func (r *GetRepositoryResponse) Body() interface{}
func (*GetRepositoryResponse) Failed ¶
func (r *GetRepositoryResponse) Failed() error
Failed implements endpoint.Failer.
type GetRepositorySyncPlanRequest ¶ added in v0.0.32
type GetRepositorySyncPlanRequest struct {
Repository string `json:"repository"`
}
type GetRepositorySyncPlanResponse ¶ added in v0.0.32
type GetRepositorySyncPlanResponse struct { SyncPlan *RepositorySyncPlan `json:"sync_plan"` Err error `json:"-"` }
func (*GetRepositorySyncPlanResponse) Body ¶ added in v0.0.32
func (r *GetRepositorySyncPlanResponse) Body() interface{}
func (*GetRepositorySyncPlanResponse) Failed ¶ added in v0.0.32
func (r *GetRepositorySyncPlanResponse) Failed() error
Failed implements endpoint.Failer.
type GetRepositorySyncStatusRequest ¶
type GetRepositorySyncStatusRequest struct {
Repository string `json:"repository"`
}
type GetRepositorySyncStatusResponse ¶
type GetRepositorySyncStatusResponse struct { SyncStatus *SyncStatus `json:"sync_status"` Err error `json:"-"` }
func (*GetRepositorySyncStatusResponse) Body ¶
func (r *GetRepositorySyncStatusResponse) Body() interface{}
func (*GetRepositorySyncStatusResponse) Failed ¶
func (r *GetRepositorySyncStatusResponse) Failed() error
Failed implements endpoint.Failer.
type HTTPClient ¶
type HTTPClient struct {
// contains filtered or unexported fields
}
func NewHTTPClient ¶
func (*HTTPClient) CreateRepository ¶
func (c *HTTPClient) CreateRepository(ctx context.Context, repository string, properties *RepositoryProperties) (err error)
func (*HTTPClient) DeleteRepository ¶
func (*HTTPClient) DeleteRepositoryFile ¶ added in v0.0.32
func (*HTTPClient) DeleteRepositoryFilesByMode ¶ added in v0.0.35
func (*HTTPClient) GenerateRepository ¶ added in v0.0.32
func (c *HTTPClient) GenerateRepository(ctx context.Context, repository string) (err error)
func (*HTTPClient) GetRepository ¶
func (c *HTTPClient) GetRepository(ctx context.Context, repository string) (properties *RepositoryProperties, err error)
func (*HTTPClient) GetRepositoryFile ¶
func (c *HTTPClient) GetRepositoryFile(ctx context.Context, repository string, file string) (repositoryFile *RepositoryFile, err error)
func (*HTTPClient) GetRepositoryFileCount ¶ added in v0.0.32
func (*HTTPClient) GetRepositorySyncPlan ¶ added in v0.0.32
func (c *HTTPClient) GetRepositorySyncPlan(ctx context.Context, repository string) (syncPlan *RepositorySyncPlan, err error)
func (*HTTPClient) GetRepositorySyncStatus ¶
func (c *HTTPClient) GetRepositorySyncStatus(ctx context.Context, repository string) (syncStatus *SyncStatus, err error)
func (*HTTPClient) ListRepositoryFiles ¶
func (c *HTTPClient) ListRepositoryFiles(ctx context.Context, repository string, page *Page) (repositoryFiles []*RepositoryFile, err error)
func (*HTTPClient) ListRepositoryLogs ¶
func (c *HTTPClient) ListRepositoryLogs(ctx context.Context, repository string, page *Page) (logs []RepositoryLog, err error)
func (*HTTPClient) SyncRepository ¶
func (*HTTPClient) SyncRepositoryWithConfig ¶ added in v0.0.34
func (c *HTTPClient) SyncRepositoryWithConfig(ctx context.Context, repository string, mirrorConfigs []MirrorConfig, webConfig *WebConfig, wait bool) (err error)
func (*HTTPClient) UpdateRepository ¶
func (c *HTTPClient) UpdateRepository(ctx context.Context, repository string, properties *RepositoryProperties) (err error)
type ListRepositoryFilesResponse ¶
type ListRepositoryFilesResponse struct { RepositoryFiles []*RepositoryFile `json:"repository_files"` Err error `json:"-"` }
func (*ListRepositoryFilesResponse) Body ¶
func (r *ListRepositoryFilesResponse) Body() interface{}
func (*ListRepositoryFilesResponse) Failed ¶
func (r *ListRepositoryFilesResponse) Failed() error
Failed implements endpoint.Failer.
type ListRepositoryLogsResponse ¶
type ListRepositoryLogsResponse struct { Logs []RepositoryLog `json:"logs"` Err error `json:"-"` }
func (*ListRepositoryLogsResponse) Body ¶
func (r *ListRepositoryLogsResponse) Body() interface{}
func (*ListRepositoryLogsResponse) Failed ¶
func (r *ListRepositoryLogsResponse) Failed() error
Failed implements endpoint.Failer.
type Mirror ¶
type Mirror interface { // Create a Mirror repository. //kun:op POST /repository //kun:success statusCode=200 CreateRepository(ctx context.Context, repository string, properties *RepositoryProperties) (err error) // Delete a Mirror repository. //kun:op DELETE /repository //kun:success statusCode=200 DeleteRepository(ctx context.Context, repository string, deleteFiles bool) (err error) // Update Mirror repository properties. //kun:op PUT /repository //kun:success statusCode=200 UpdateRepository(ctx context.Context, repository string, properties *RepositoryProperties) (err error) // Get Mirror repository properties. //kun:op GET /repository //kun:success statusCode=200 GetRepository(ctx context.Context, repository string) (properties *RepositoryProperties, err error) // Sync Mirror repository with an upstream repository. //kun:op GET /repository/sync //kun:success statusCode=200 SyncRepository(ctx context.Context, repository string, wait bool) (err error) // Sync Mirror repository with an upstream repository using a specified config. //kun:op GET /repository/sync:config //kun:success statusCode=200 SyncRepositoryWithConfig(ctx context.Context, repository string, mirrorConfigs []MirrorConfig, webConfig *WebConfig, wait bool) (err error) // Generate Mirror web pages . //kun:op GET /repository/generate:web //kun:success statusCode=200 GenerateRepository(ctx context.Context, repository string) (err error) // Get Mirror repository sync status. //kun:op GET /repository/sync:status //kun:success statusCode=200 GetRepositorySyncStatus(ctx context.Context, repository string) (syncStatus *SyncStatus, err error) // Get Mirror repository sync plan. //kun:op GET /repository/sync:plan //kun:success statusCode=200 GetRepositorySyncPlan(ctx context.Context, repository string) (syncPlan *RepositorySyncPlan, err error) // List Mirror repository logs. //kun:op GET /repository/logs //kun:success statusCode=200 ListRepositoryLogs(ctx context.Context, repository string, page *Page) (logs []RepositoryLog, err error) // List files for a Mirror repository. //kun:op GET /repository/file:list //kun:success statusCode=200 ListRepositoryFiles(ctx context.Context, repository string, page *Page) (repositoryFiles []*RepositoryFile, err error) // Get file for a Mirror repository. //kun:op GET /repository/file //kun:success statusCode=200 GetRepositoryFile(ctx context.Context, repository, file string) (repositoryFile *RepositoryFile, err error) // Get file count for a Mirror repository. //kun:op GET /repository/file:count //kun:success statusCode=200 GetRepositoryFileCount(ctx context.Context, repository string) (count int, err error) // Delete file for a Mirror repository. //kun:op DELETE /repository/file //kun:success statusCode=200 DeleteRepositoryFile(ctx context.Context, repository, file string) (err error) // Delete files by mode for a Mirror repository. //kun:op DELETE /repository/file:mode //kun:success statusCode=200 DeleteRepositoryFilesByMode(ctx context.Context, repository string, mode uint32) (err error) }
Mirror is used for managing mirror repositories. This is the API documentation of Mirror.
type MirrorConfig ¶ added in v0.0.32
type MirrorConfig struct { URL string `json:"url"` HTTPURL string `json:"http_url"` Destination string `json:"destination"` Exclusions []string `json:"exclusions"` }
Mirror content configurations.
type RepositoryFile ¶
type RepositoryFile struct { Tag string `json:"tag"` Name string `json:"name"` Reference string `json:"reference"` Parent string `json:"parent"` Link string `json:"link"` LinkReference string `json:"link_reference"` ModifiedTime string `json:"modified_time"` Mode uint32 `json:"mode"` Size uint64 `json:"size"` ConfigID uint64 `json:"config_id"` }
Repository files.
type RepositoryLog ¶
type RepositoryLog struct { Level string `json:"level"` Date string `json:"date"` Message string `json:"message"` }
Repository logs.
type RepositoryProperties ¶
type RepositoryProperties struct { // Configure the repository as a mirror. Mirror *bool `json:"mirror,omitempty"` // Mirror content configurations. MirrorConfigs []MirrorConfig `json:"mirror_configs,omitempty"` // Web content configuration. WebConfig *WebConfig `json:"web_config,omitempty"` }
Repository properties/configuration.
type RepositorySyncPlan ¶ added in v0.0.32
Repository synchronization plan.
type SyncRepositoryRequest ¶
type SyncRepositoryResponse ¶
type SyncRepositoryResponse struct {
Err error `json:"-"`
}
func (*SyncRepositoryResponse) Body ¶
func (r *SyncRepositoryResponse) Body() interface{}
func (*SyncRepositoryResponse) Failed ¶
func (r *SyncRepositoryResponse) Failed() error
Failed implements endpoint.Failer.
type SyncRepositoryWithConfigRequest ¶ added in v0.0.34
type SyncRepositoryWithConfigRequest struct { Repository string `json:"repository"` MirrorConfigs []MirrorConfig `json:"mirror_configs"` WebConfig *WebConfig `json:"web_config"` Wait bool `json:"wait"` }
type SyncRepositoryWithConfigResponse ¶ added in v0.0.34
type SyncRepositoryWithConfigResponse struct {
Err error `json:"-"`
}
func (*SyncRepositoryWithConfigResponse) Body ¶ added in v0.0.34
func (r *SyncRepositoryWithConfigResponse) Body() interface{}
func (*SyncRepositoryWithConfigResponse) Failed ¶ added in v0.0.34
func (r *SyncRepositoryWithConfigResponse) Failed() error
Failed implements endpoint.Failer.
type SyncStatus ¶
type SyncStatus struct { Syncing bool `json:"syncing"` StartTime string `json:"start_time"` EndTime string `json:"end_time"` SyncError string `json:"sync_error"` }
Mirror sync status.
type UpdateRepositoryRequest ¶
type UpdateRepositoryRequest struct { Repository string `json:"repository"` Properties *RepositoryProperties `json:"properties"` }
type UpdateRepositoryResponse ¶
type UpdateRepositoryResponse struct {
Err error `json:"-"`
}
func (*UpdateRepositoryResponse) Body ¶
func (r *UpdateRepositoryResponse) Body() interface{}
func (*UpdateRepositoryResponse) Failed ¶
func (r *UpdateRepositoryResponse) Failed() error
Failed implements endpoint.Failer.