Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings
This repository was archived by the owner on Aug 30, 2024. It is now read-only.
/coder-v1-cliPublic archive

Commit7ec3e35

Browse files
committed
Migrate all API routes to /api/private
1 parent25ae52a commit7ec3e35

File tree

12 files changed

+55
-55
lines changed

12 files changed

+55
-55
lines changed

‎coder-sdk/activity.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ type activityRequest struct {
1212

1313
// PushActivity pushes CLI activity to Coder.
1414
func (cClient)PushActivity(ctx context.Context,source,envIDstring)error {
15-
resp,err:=c.request(ctx,http.MethodPost,"/api/metrics/usage/push",activityRequest{
15+
resp,err:=c.request(ctx,http.MethodPost,"/api/private/metrics/usage/push",activityRequest{
1616
Source:source,
1717
EnvironmentID:envID,
1818
})

‎coder-sdk/config.go

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -67,29 +67,29 @@ type ConfigOAuth struct {
6767
// SiteConfigAuth fetches the sitewide authentication configuration.
6868
func (cClient)SiteConfigAuth(ctx context.Context) (*ConfigAuth,error) {
6969
varconfConfigAuth
70-
iferr:=c.requestBody(ctx,http.MethodGet,"/api/auth/config",nil,&conf);err!=nil {
70+
iferr:=c.requestBody(ctx,http.MethodGet,"/api/private/auth/config",nil,&conf);err!=nil {
7171
returnnil,err
7272
}
7373
return&conf,nil
7474
}
7575

7676
// PutSiteConfigAuth sets the sitewide authentication configuration.
7777
func (cClient)PutSiteConfigAuth(ctx context.Context,reqConfigAuth)error {
78-
returnc.requestBody(ctx,http.MethodPut,"/api/auth/config",req,nil)
78+
returnc.requestBody(ctx,http.MethodPut,"/api/private/auth/config",req,nil)
7979
}
8080

8181
// SiteConfigOAuth fetches the sitewide git provider OAuth configuration.
8282
func (cClient)SiteConfigOAuth(ctx context.Context) (*ConfigOAuth,error) {
8383
varconfConfigOAuth
84-
iferr:=c.requestBody(ctx,http.MethodGet,"/api/oauth/config",nil,&conf);err!=nil {
84+
iferr:=c.requestBody(ctx,http.MethodGet,"/api/private/oauth/config",nil,&conf);err!=nil {
8585
returnnil,err
8686
}
8787
return&conf,nil
8888
}
8989

9090
// PutSiteConfigOAuth sets the sitewide git provider OAuth configuration.
9191
func (cClient)PutSiteConfigOAuth(ctx context.Context,reqConfigOAuth)error {
92-
returnc.requestBody(ctx,http.MethodPut,"/api/oauth/config",req,nil)
92+
returnc.requestBody(ctx,http.MethodPut,"/api/private/oauth/config",req,nil)
9393
}
9494

9595
typeconfigSetupModestruct {
@@ -99,7 +99,7 @@ type configSetupMode struct {
9999
// SiteSetupModeEnabled fetches the current setup_mode state of a Coder Enterprise deployment.
100100
func (cClient)SiteSetupModeEnabled(ctx context.Context) (bool,error) {
101101
varconfconfigSetupMode
102-
iferr:=c.requestBody(ctx,http.MethodGet,"/api/config/setup-mode",nil,&conf);err!=nil {
102+
iferr:=c.requestBody(ctx,http.MethodGet,"/api/private/config/setup-mode",nil,&conf);err!=nil {
103103
returnfalse,err
104104
}
105105
returnconf.SetupMode,nil
@@ -127,13 +127,13 @@ type ConfigExtensionMarketplace struct {
127127
// SiteConfigExtensionMarketplace fetches the extension marketplace configuration.
128128
func (cClient)SiteConfigExtensionMarketplace(ctx context.Context) (*ConfigExtensionMarketplace,error) {
129129
varconfConfigExtensionMarketplace
130-
iferr:=c.requestBody(ctx,http.MethodGet,"/api/extensions/config",nil,&conf);err!=nil {
130+
iferr:=c.requestBody(ctx,http.MethodGet,"/api/private/extensions/config",nil,&conf);err!=nil {
131131
returnnil,err
132132
}
133133
return&conf,nil
134134
}
135135

136136
// PutSiteConfigExtensionMarketplace sets the extension marketplace configuration.
137137
func (cClient)PutSiteConfigExtensionMarketplace(ctx context.Context,reqConfigExtensionMarketplace)error {
138-
returnc.requestBody(ctx,http.MethodPut,"/api/extensions/config",req,nil)
138+
returnc.requestBody(ctx,http.MethodPut,"/api/private/extensions/config",req,nil)
139139
}

‎coder-sdk/devurl.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ type delDevURLRequest struct {
2323

2424
// DeleteDevURL deletes the specified devurl.
2525
func (cClient)DeleteDevURL(ctx context.Context,envID,urlIDstring)error {
26-
reqURL:=fmt.Sprintf("/api/environments/%s/devurls/%s",envID,urlID)
26+
reqURL:=fmt.Sprintf("/api/private/environments/%s/devurls/%s",envID,urlID)
2727

2828
returnc.requestBody(ctx,http.MethodDelete,reqURL,delDevURLRequest{
2929
EnvID:envID,
@@ -42,13 +42,13 @@ type CreateDevURLReq struct {
4242

4343
// CreateDevURL inserts a new devurl for the authenticated user.
4444
func (cClient)CreateDevURL(ctx context.Context,envIDstring,reqCreateDevURLReq)error {
45-
returnc.requestBody(ctx,http.MethodPost,"/api/environments/"+envID+"/devurls",req,nil)
45+
returnc.requestBody(ctx,http.MethodPost,"/api/private/environments/"+envID+"/devurls",req,nil)
4646
}
4747

4848
// PutDevURLReq defines the request parameters for overwriting a DevURL.
4949
typePutDevURLReqCreateDevURLReq
5050

5151
// PutDevURL updates an existing devurl for the authenticated user.
5252
func (cClient)PutDevURL(ctx context.Context,envID,urlIDstring,reqPutDevURLReq)error {
53-
returnc.requestBody(ctx,http.MethodPut,"/api/environments/"+envID+"/devurls/"+urlID,req,nil)
53+
returnc.requestBody(ctx,http.MethodPut,"/api/private/environments/"+envID+"/devurls/"+urlID,req,nil)
5454
}

‎coder-sdk/env.go

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,7 @@ type CreateEnvironmentRequest struct {
8383
// CreateEnvironment sends a request to create an environment.
8484
func (cClient)CreateEnvironment(ctx context.Context,orgIDstring,reqCreateEnvironmentRequest) (*Environment,error) {
8585
varenvEnvironment
86-
iferr:=c.requestBody(ctx,http.MethodPost,"/api/orgs/"+orgID+"/environments",req,&env);err!=nil {
86+
iferr:=c.requestBody(ctx,http.MethodPost,"/api/private/orgs/"+orgID+"/environments",req,&env);err!=nil {
8787
returnnil,err
8888
}
8989
return&env,nil
@@ -93,7 +93,7 @@ func (c Client) CreateEnvironment(ctx context.Context, orgID string, req CreateE
9393
// TODO: add the filter options, explore performance issue.
9494
func (cClient)Environments(ctx context.Context) ([]Environment,error) {
9595
varenvs []Environment
96-
iferr:=c.requestBody(ctx,http.MethodGet,"/api/environments",nil,&envs);err!=nil {
96+
iferr:=c.requestBody(ctx,http.MethodGet,"/api/private/environments",nil,&envs);err!=nil {
9797
returnnil,err
9898
}
9999
returnenvs,nil
@@ -102,20 +102,20 @@ func (c Client) Environments(ctx context.Context) ([]Environment, error) {
102102
// EnvironmentsByOrganization gets the list of environments owned by the given user.
103103
func (cClient)EnvironmentsByOrganization(ctx context.Context,userID,orgIDstring) ([]Environment,error) {
104104
varenvs []Environment
105-
iferr:=c.requestBody(ctx,http.MethodGet,"/api/orgs/"+orgID+"/members/"+userID+"/environments",nil,&envs);err!=nil {
105+
iferr:=c.requestBody(ctx,http.MethodGet,"/api/private/orgs/"+orgID+"/members/"+userID+"/environments",nil,&envs);err!=nil {
106106
returnnil,err
107107
}
108108
returnenvs,nil
109109
}
110110

111111
// DeleteEnvironment deletes the environment.
112112
func (cClient)DeleteEnvironment(ctx context.Context,envIDstring)error {
113-
returnc.requestBody(ctx,http.MethodDelete,"/api/environments/"+envID,nil,nil)
113+
returnc.requestBody(ctx,http.MethodDelete,"/api/private/environments/"+envID,nil,nil)
114114
}
115115

116116
// StopEnvironment stops the stops.
117117
func (cClient)StopEnvironment(ctx context.Context,envIDstring)error {
118-
returnc.requestBody(ctx,http.MethodPut,"/api/environments/"+envID+"/stop",nil,nil)
118+
returnc.requestBody(ctx,http.MethodPut,"/api/private/environments/"+envID+"/stop",nil,nil)
119119
}
120120

121121
// UpdateEnvironmentReq defines the update operation, only setting
@@ -133,12 +133,12 @@ type UpdateEnvironmentReq struct {
133133

134134
// RebuildEnvironment requests that the given envID is rebuilt with no changes to its specification.
135135
func (cClient)RebuildEnvironment(ctx context.Context,envIDstring)error {
136-
returnc.requestBody(ctx,http.MethodPatch,"/api/environments/"+envID,UpdateEnvironmentReq{},nil)
136+
returnc.requestBody(ctx,http.MethodPatch,"/api/private/environments/"+envID,UpdateEnvironmentReq{},nil)
137137
}
138138

139139
// EditEnvironment modifies the environment specification and initiates a rebuild.
140140
func (cClient)EditEnvironment(ctx context.Context,envIDstring,reqUpdateEnvironmentReq)error {
141-
returnc.requestBody(ctx,http.MethodPatch,"/api/environments/"+envID,req,nil)
141+
returnc.requestBody(ctx,http.MethodPatch,"/api/private/environments/"+envID,req,nil)
142142
}
143143

144144
// DialWsep dials an environments command execution interface
@@ -163,7 +163,7 @@ func (c Client) DialIDEStatus(ctx context.Context, envID string) (*websocket.Con
163163

164164
// DialEnvironmentBuildLog opens a websocket connection for the environment build log messages.
165165
func (cClient)DialEnvironmentBuildLog(ctx context.Context,envIDstring) (*websocket.Conn,error) {
166-
returnc.dialWebsocket(ctx,"/api/environments/"+envID+"/watch-update")
166+
returnc.dialWebsocket(ctx,"/api/private/environments/"+envID+"/watch-update")
167167
}
168168

169169
// BuildLog defines a build log record for a Coder environment.
@@ -211,12 +211,12 @@ func (c Client) FollowEnvironmentBuildLog(ctx context.Context, envID string) (<-
211211

212212
// DialEnvironmentStats opens a websocket connection for environment stats.
213213
func (cClient)DialEnvironmentStats(ctx context.Context,envIDstring) (*websocket.Conn,error) {
214-
returnc.dialWebsocket(ctx,"/api/environments/"+envID+"/watch-stats")
214+
returnc.dialWebsocket(ctx,"/api/private/environments/"+envID+"/watch-stats")
215215
}
216216

217217
// DialResourceLoad opens a websocket connection for cpu load metrics on the environment.
218218
func (cClient)DialResourceLoad(ctx context.Context,envIDstring) (*websocket.Conn,error) {
219-
returnc.dialWebsocket(ctx,"/api/environments/"+envID+"/watch-resource-load")
219+
returnc.dialWebsocket(ctx,"/api/private/environments/"+envID+"/watch-resource-load")
220220
}
221221

222222
// BuildLogType describes the type of an event.

‎coder-sdk/image.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ type UpdateImageReq struct {
5858
// ImportImage creates a new image and optionally a new registry.
5959
func (cClient)ImportImage(ctx context.Context,orgIDstring,reqImportImageReq) (*Image,error) {
6060
varimgImage
61-
iferr:=c.requestBody(ctx,http.MethodPost,"/api/orgs/"+orgID+"/images",req,&img);err!=nil {
61+
iferr:=c.requestBody(ctx,http.MethodPost,"/api/private/orgs/"+orgID+"/images",req,&img);err!=nil {
6262
returnnil,err
6363
}
6464
return&img,nil
@@ -67,13 +67,13 @@ func (c Client) ImportImage(ctx context.Context, orgID string, req ImportImageRe
6767
// OrganizationImages returns all of the images imported for orgID.
6868
func (cClient)OrganizationImages(ctx context.Context,orgIDstring) ([]Image,error) {
6969
varimgs []Image
70-
iferr:=c.requestBody(ctx,http.MethodGet,"/api/orgs/"+orgID+"/images",nil,&imgs);err!=nil {
70+
iferr:=c.requestBody(ctx,http.MethodGet,"/api/private/orgs/"+orgID+"/images",nil,&imgs);err!=nil {
7171
returnnil,err
7272
}
7373
returnimgs,nil
7474
}
7575

7676
// UpdateImage applies a partial update to an image resource.
7777
func (cClient)UpdateImage(ctx context.Context,imageIDstring,reqUpdateImageReq)error {
78-
returnc.requestBody(ctx,http.MethodPatch,"/api/images/"+imageID,req,nil)
78+
returnc.requestBody(ctx,http.MethodPatch,"/api/private/images/"+imageID,req,nil)
7979
}

‎coder-sdk/org.go

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ const (
3939
// Organizations gets all Organizations.
4040
func (cClient)Organizations(ctx context.Context) ([]Organization,error) {
4141
varorgs []Organization
42-
iferr:=c.requestBody(ctx,http.MethodGet,"/api/orgs",nil,&orgs);err!=nil {
42+
iferr:=c.requestBody(ctx,http.MethodGet,"/api/private/orgs",nil,&orgs);err!=nil {
4343
returnnil,err
4444
}
4545
returnorgs,nil
@@ -48,7 +48,7 @@ func (c Client) Organizations(ctx context.Context) ([]Organization, error) {
4848
// OrganizationByID get the Organization by its ID.
4949
func (cClient)OrganizationByID(ctx context.Context,orgIDstring) (*Organization,error) {
5050
varorgOrganization
51-
err:=c.requestBody(ctx,http.MethodGet,"/api/orgs/"+orgID,nil,&org)
51+
err:=c.requestBody(ctx,http.MethodGet,"/api/private/orgs/"+orgID,nil,&org)
5252
iferr!=nil {
5353
returnnil,err
5454
}
@@ -58,7 +58,7 @@ func (c Client) OrganizationByID(ctx context.Context, orgID string) (*Organizati
5858
// OrganizationMembers get all members of the given organization.
5959
func (cClient)OrganizationMembers(ctx context.Context,orgIDstring) ([]OrganizationUser,error) {
6060
varmembers []OrganizationUser
61-
iferr:=c.requestBody(ctx,http.MethodGet,"/api/orgs/"+orgID+"/members",nil,&members);err!=nil {
61+
iferr:=c.requestBody(ctx,http.MethodGet,"/api/private/orgs/"+orgID+"/members",nil,&members);err!=nil {
6262
returnnil,err
6363
}
6464
returnmembers,nil
@@ -76,7 +76,7 @@ type UpdateOrganizationReq struct {
7676

7777
// UpdateOrganization applys a partial update of an Organization resource.
7878
func (cClient)UpdateOrganization(ctx context.Context,orgIDstring,reqUpdateOrganizationReq)error {
79-
returnc.requestBody(ctx,http.MethodPatch,"/api/orgs/"+orgID,req,nil)
79+
returnc.requestBody(ctx,http.MethodPatch,"/api/private/orgs/"+orgID,req,nil)
8080
}
8181

8282
// CreateOrganizationReq describes the request parameters to create a new Organization.
@@ -92,10 +92,10 @@ type CreateOrganizationReq struct {
9292

9393
// CreateOrganization creates a new Organization in Coder Enterprise.
9494
func (cClient)CreateOrganization(ctx context.Context,reqCreateOrganizationReq)error {
95-
returnc.requestBody(ctx,http.MethodPost,"/api/orgs",req,nil)
95+
returnc.requestBody(ctx,http.MethodPost,"/api/private/orgs",req,nil)
9696
}
9797

9898
// DeleteOrganization deletes an organization.
9999
func (cClient)DeleteOrganization(ctx context.Context,orgIDstring)error {
100-
returnc.requestBody(ctx,http.MethodDelete,"/api/orgs/"+orgID,nil,nil)
100+
returnc.requestBody(ctx,http.MethodDelete,"/api/private/orgs/"+orgID,nil,nil)
101101
}

‎coder-sdk/registries.go

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ type Registry struct {
1919
// Registries fetches all registries in an organization.
2020
func (cClient)Registries(ctx context.Context,orgIDstring) ([]Registry,error) {
2121
varr []Registry
22-
iferr:=c.requestBody(ctx,http.MethodGet,"/api/orgs/"+orgID+"/registries",nil,&r);err!=nil {
22+
iferr:=c.requestBody(ctx,http.MethodGet,"/api/private/orgs/"+orgID+"/registries",nil,&r);err!=nil {
2323
returnnil,err
2424
}
2525
returnr,nil
@@ -28,7 +28,7 @@ func (c Client) Registries(ctx context.Context, orgID string) ([]Registry, error
2828
// RegistryByID fetches a registry resource by its ID.
2929
func (cClient)RegistryByID(ctx context.Context,orgID,registryIDstring) (*Registry,error) {
3030
varrRegistry
31-
iferr:=c.requestBody(ctx,http.MethodGet,"/api/orgs/"+orgID+"/registries/"+registryID,nil,&r);err!=nil {
31+
iferr:=c.requestBody(ctx,http.MethodGet,"/api/private/orgs/"+orgID+"/registries/"+registryID,nil,&r);err!=nil {
3232
returnnil,err
3333
}
3434
return&r,nil
@@ -44,10 +44,10 @@ type UpdateRegistryReq struct {
4444

4545
// UpdateRegistry applies a partial update to a registry resource.
4646
func (cClient)UpdateRegistry(ctx context.Context,orgID,registryIDstring,reqUpdateRegistryReq)error {
47-
returnc.requestBody(ctx,http.MethodPatch,"/api/orgs/"+orgID+"/registries/"+registryID,req,nil)
47+
returnc.requestBody(ctx,http.MethodPatch,"/api/private/orgs/"+orgID+"/registries/"+registryID,req,nil)
4848
}
4949

5050
// DeleteRegistry deletes a registry resource by its ID.
5151
func (cClient)DeleteRegistry(ctx context.Context,orgID,registryIDstring)error {
52-
returnc.requestBody(ctx,http.MethodDelete,"/api/orgs/"+orgID+"/registries/"+registryID,nil,nil)
52+
returnc.requestBody(ctx,http.MethodDelete,"/api/private/orgs/"+orgID+"/registries/"+registryID,nil,nil)
5353
}

‎coder-sdk/secrets.go

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ type Secret struct {
2323
// Deprecated: Coder Secrets will be removed from Coder Enterprise in a future release.
2424
func (cClient)Secrets(ctx context.Context,userIDstring) ([]Secret,error) {
2525
varsecrets []Secret
26-
iferr:=c.requestBody(ctx,http.MethodGet,"/api/users/"+userID+"/secrets",nil,&secrets);err!=nil {
26+
iferr:=c.requestBody(ctx,http.MethodGet,"/api/private/users/"+userID+"/secrets",nil,&secrets);err!=nil {
2727
returnnil,err
2828
}
2929
returnsecrets,nil
@@ -42,7 +42,7 @@ func (c Client) SecretWithValueByName(ctx context.Context, name, userID string)
4242
// NOTE: This is racy, but acceptable. If the secret is gone or the permission changed since we looked up the id,
4343
// the call will simply fail and surface the error to the user.
4444
varsecretSecret
45-
iferr:=c.requestBody(ctx,http.MethodGet,"/api/users/"+userID+"/secrets/"+s.ID,nil,&secret);err!=nil {
45+
iferr:=c.requestBody(ctx,http.MethodGet,"/api/private/users/"+userID+"/secrets/"+s.ID,nil,&secret);err!=nil {
4646
returnnil,err
4747
}
4848
return&secret,nil
@@ -53,7 +53,7 @@ func (c Client) SecretWithValueByName(ctx context.Context, name, userID string)
5353
// Deprecated: Coder Secrets will be removed from Coder Enterprise in a future release.
5454
func (cClient)SecretWithValueByID(ctx context.Context,id,userIDstring) (*Secret,error) {
5555
varsecretSecret
56-
iferr:=c.requestBody(ctx,http.MethodGet,"/api/users/"+userID+"/secrets/"+id,nil,&secret);err!=nil {
56+
iferr:=c.requestBody(ctx,http.MethodGet,"/api/private/users/"+userID+"/secrets/"+id,nil,&secret);err!=nil {
5757
returnnil,err
5858
}
5959
return&secret,nil
@@ -88,7 +88,7 @@ type InsertSecretReq struct {
8888
//
8989
// Deprecated: Coder Secrets will be removed from Coder Enterprise in a future release.
9090
func (cClient)InsertSecret(ctx context.Context,userIDstring,reqInsertSecretReq)error {
91-
returnc.requestBody(ctx,http.MethodPost,"/api/users/"+userID+"/secrets",req,nil)
91+
returnc.requestBody(ctx,http.MethodPost,"/api/private/users/"+userID+"/secrets",req,nil)
9292
}
9393

9494
// DeleteSecretByName deletes the authenticated users secret with the given name.
@@ -103,7 +103,7 @@ func (c Client) DeleteSecretByName(ctx context.Context, name, userID string) err
103103
// Delete the secret.
104104
// NOTE: This is racy, but acceptable. If the secret is gone or the permission changed since we looked up the id,
105105
// the call will simply fail and surface the error to the user.
106-
resp,err:=c.request(ctx,http.MethodDelete,"/api/users/"+userID+"/secrets/"+secret.ID,nil)
106+
resp,err:=c.request(ctx,http.MethodDelete,"/api/private/users/"+userID+"/secrets/"+secret.ID,nil)
107107
iferr!=nil {
108108
returnerr
109109
}

‎coder-sdk/tags.go

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -42,21 +42,21 @@ type CreateImageTagReq struct {
4242
// CreateImageTag creates a new image tag resource.
4343
func (cClient)CreateImageTag(ctx context.Context,imageIDstring,reqCreateImageTagReq) (*ImageTag,error) {
4444
vartagImageTag
45-
iferr:=c.requestBody(ctx,http.MethodPost,"/api/images/"+imageID+"/tags",req,tag);err!=nil {
45+
iferr:=c.requestBody(ctx,http.MethodPost,"/api/private/images/"+imageID+"/tags",req,tag);err!=nil {
4646
returnnil,err
4747
}
4848
return&tag,nil
4949
}
5050

5151
// DeleteImageTag deletes an image tag resource.
5252
func (cClient)DeleteImageTag(ctx context.Context,imageID,tagstring)error {
53-
returnc.requestBody(ctx,http.MethodDelete,"/api/images/"+imageID+"/tags/"+tag,nil,nil)
53+
returnc.requestBody(ctx,http.MethodDelete,"/api/private/images/"+imageID+"/tags/"+tag,nil,nil)
5454
}
5555

5656
// ImageTags fetch all image tags.
5757
func (cClient)ImageTags(ctx context.Context,imageIDstring) ([]ImageTag,error) {
5858
vartags []ImageTag
59-
iferr:=c.requestBody(ctx,http.MethodGet,"/api/images/"+imageID+"/tags",nil,&tags);err!=nil {
59+
iferr:=c.requestBody(ctx,http.MethodGet,"/api/private/images/"+imageID+"/tags",nil,&tags);err!=nil {
6060
returnnil,err
6161
}
6262
returntags,nil
@@ -65,7 +65,7 @@ func (c Client) ImageTags(ctx context.Context, imageID string) ([]ImageTag, erro
6565
// ImageTagByID fetch an image tag by ID.
6666
func (cClient)ImageTagByID(ctx context.Context,imageID,tagIDstring) (*ImageTag,error) {
6767
vartagImageTag
68-
iferr:=c.requestBody(ctx,http.MethodGet,"/api/images/"+imageID+"/tags/"+tagID,nil,&tag);err!=nil {
68+
iferr:=c.requestBody(ctx,http.MethodGet,"/api/private/images/"+imageID+"/tags/"+tagID,nil,&tag);err!=nil {
6969
returnnil,err
7070
}
7171
return&tag,nil

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp