Documentation ¶
Index ¶
- type Client
- type RESTClient
- func (c *RESTClient) CreatePurgeSchedule(ctx context.Context, schedule *model.Schedule) error
- func (c *RESTClient) GetPurgeJob(ctx context.Context, id int64) (*model.ExecHistory, error)
- func (c *RESTClient) GetPurgeJobLog(ctx context.Context, id int64) (string, error)
- func (c *RESTClient) GetPurgeSchedule(ctx context.Context) (*model.ExecHistory, error)
- func (c *RESTClient) ListPurgeHistory(ctx context.Context) ([]*model.ExecHistory, error)
- func (c *RESTClient) RunPurge(ctx context.Context, dryRun bool) error
- func (c *RESTClient) StopPurge(ctx context.Context, id int64) error
- func (c *RESTClient) UpdatePurgeSchedule(ctx context.Context, schedule *model.Schedule) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Client ¶
type Client interface { CreatePurgeSchedule(ctx context.Context, schedule *model.Schedule) error RunPurge(ctx context.Context, dryRun bool) error ListPurgeHistory(ctx context.Context) ([]*model.ExecHistory, error) GetPurgeJob(ctx context.Context, id int64) (*model.ExecHistory, error) GetPurgeJobLog(ctx context.Context, id int64) (string, error) GetPurgeSchedule(ctx context.Context) (*model.ExecHistory, error) StopPurge(ctx context.Context, id int64) error UpdatePurgeSchedule(ctx context.Context, schedule *model.Schedule) error }
type RESTClient ¶
type RESTClient struct { // Options contains optional configuration when making API calls. Options *config.Options // The new client of the harbor v2 API V2Client *v2client.Harbor // AuthInfo contains the auth information that is provided on API calls. AuthInfo runtime.ClientAuthInfoWriter }
RESTClient is a subclient for handling purge related actions.
func NewClient ¶
func NewClient(v2Client *v2client.Harbor, opts *config.Options, authInfo runtime.ClientAuthInfoWriter) *RESTClient
func (*RESTClient) CreatePurgeSchedule ¶
CreatePurgeSchedule creates a new purge schedule.
func (*RESTClient) GetPurgeJob ¶
func (c *RESTClient) GetPurgeJob(ctx context.Context, id int64) (*model.ExecHistory, error)
func (*RESTClient) GetPurgeJobLog ¶
func (*RESTClient) GetPurgeSchedule ¶
func (c *RESTClient) GetPurgeSchedule(ctx context.Context) (*model.ExecHistory, error)
func (*RESTClient) ListPurgeHistory ¶
func (c *RESTClient) ListPurgeHistory(ctx context.Context) ([]*model.ExecHistory, error)
ListPurgeHistory lists all purge history entries. While the APIs purge service exposes a method called 'GetPurgeHistory', it technically returns a list of purge schedules.
func (*RESTClient) RunPurge ¶
func (c *RESTClient) RunPurge(ctx context.Context, dryRun bool) error
RunPurge runs a manual purge job.
func (*RESTClient) UpdatePurgeSchedule ¶
Click to show internal directories.
Click to hide internal directories.