Documentation ¶
Index ¶
- type Client
- type RESTClient
- func (c *RESTClient) GetGarbageCollectionExecution(ctx context.Context, id int64) (*modelv2.GCHistory, error)
- func (c *RESTClient) GetGarbageCollectionSchedule(ctx context.Context) (*modelv2.GCHistory, error)
- func (c *RESTClient) NewGarbageCollection(ctx context.Context, gcSchedule *modelv2.Schedule) error
- func (c *RESTClient) ResetGarbageCollection(ctx context.Context) error
- func (c *RESTClient) UpdateGarbageCollection(ctx context.Context, newGCSchedule *modelv2.Schedule) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Client ¶
type Client interface { NewGarbageCollection(ctx context.Context, gcSchedule *modelv2.Schedule) error UpdateGarbageCollection(ctx context.Context, newGCSchedule *modelv2.Schedule) error GetGarbageCollectionExecution(ctx context.Context, id int64) (*modelv2.GCHistory, error) GetGarbageCollectionSchedule(ctx context.Context) (*modelv2.GCHistory, error) ResetGarbageCollection(ctx context.Context) 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 system related actions.
func NewClient ¶
func NewClient(v2Client *v2client.Harbor, opts *config.Options, authInfo runtime.ClientAuthInfoWriter) *RESTClient
func (*RESTClient) GetGarbageCollectionExecution ¶
func (c *RESTClient) GetGarbageCollectionExecution(ctx context.Context, id int64) (*modelv2.GCHistory, error)
GetGarbageCollectionExecution Returns a garbage collection execution identified by its id.
func (*RESTClient) GetGarbageCollectionSchedule ¶
GetGarbageCollectionSchedule returns the system GC schedule.
func (*RESTClient) NewGarbageCollection ¶
NewGarbageCollection creates a new garbage collection schedule.
func (*RESTClient) ResetGarbageCollection ¶
func (c *RESTClient) ResetGarbageCollection(ctx context.Context) error
ResetGarbageCollection resets the system GC schedule to it's default values containing "None" as the Schedule Type, which effectively deactivates the schedule. For this to work correctly, a GC schedule must exist beforehand.
func (*RESTClient) UpdateGarbageCollection ¶
func (c *RESTClient) UpdateGarbageCollection(ctx context.Context, newGCSchedule *modelv2.Schedule) error
UpdateGarbageCollection updates the system GC schedule.
Click to show internal directories.
Click to hide internal directories.