5
5
"net/url"
6
6
"strings"
7
7
8
+ "github.com/mittwald/goharbor-client/v5/apiv2/pkg/clients/configure"
8
9
"github.com/mittwald/goharbor-client/v5/apiv2/pkg/clients/ping"
9
10
"github.com/mittwald/goharbor-client/v5/apiv2/pkg/clients/statistic"
10
11
@@ -49,6 +50,7 @@ const v2URLSuffix string = "/v2.0"
49
50
type Client interface {
50
51
auditlog.Client
51
52
artifact.Client
53
+ configure.Client
52
54
gc.Client
53
55
health.Client
54
56
label.Client
@@ -73,6 +75,7 @@ type Client interface {
73
75
type RESTClient struct {
74
76
auditlog * auditlog.RESTClient
75
77
artifact * artifact.RESTClient
78
+ configure * configure.RESTClient
76
79
gc * gc.RESTClient
77
80
health * health.RESTClient
78
81
label * label.RESTClient
@@ -103,6 +106,7 @@ func NewRESTClient(v2Client *v2client.Harbor, opts *config.Options, authInfo run
103
106
return & RESTClient {
104
107
auditlog : auditlog .NewClient (v2Client , opts , authInfo ),
105
108
artifact : artifact .NewClient (v2Client , opts , authInfo ),
109
+ configure : configure .NewClient (v2Client , opts , authInfo ),
106
110
gc : gc .NewClient (v2Client , opts , authInfo ),
107
111
health : health .NewClient (v2Client , opts , authInfo ),
108
112
label : label .NewClient (v2Client , opts , authInfo ),
@@ -213,6 +217,16 @@ func (c *RESTClient) RemoveLabel(ctx context.Context, projectName, repositoryNam
213
217
return c .artifact .RemoveLabel (ctx , projectName , repositoryName , reference , id )
214
218
}
215
219
220
+ // Configure Client
221
+
222
+ func (c * RESTClient ) GetConfig (ctx context.Context ) (* modelv2.ConfigurationsResponse , error ) {
223
+ return c .configure .GetConfigs (ctx )
224
+ }
225
+
226
+ func (c * RESTClient ) UpdateConfigs (ctx context.Context , cfg * modelv2.Configurations ) error {
227
+ return c .configure .UpdateConfigs (ctx , cfg )
228
+ }
229
+
216
230
// GC Client
217
231
218
232
func (c * RESTClient ) NewGarbageCollection (ctx context.Context , gcSchedule * modelv2.Schedule ) error {
0 commit comments