Documentation
¶
Overview ¶
Package v1 provides primitives to interact with the openapi HTTP API.
Code generated by github.com/deepmap/oapi-codegen version v1.11.0 DO NOT EDIT.
Package v1 provides primitives to interact with the openapi HTTP API.
Code generated by github.com/deepmap/oapi-codegen version v1.11.0 DO NOT EDIT.
Package v1 provides primitives to interact with the openapi HTTP API.
Code generated by github.com/deepmap/oapi-codegen version v1.11.0 DO NOT EDIT.
Example (Basic) ¶
Example API定義から生成されたコードを直接利用する例
package main import ( "context" "fmt" "os" v1 "github.com/sacloud/object-storage-api-go/apis/v1" ) var serverURL = "https://secure.sakura.ad.jp/cloud/zone/is1a/api/objectstorage/1.0" func main() { token := os.Getenv("SAKURACLOUD_ACCESS_TOKEN") secret := os.Getenv("SAKURACLOUD_ACCESS_TOKEN_SECRET") client, err := v1.NewClientWithResponses(serverURL, func(c *v1.Client) error { c.RequestEditors = []v1.RequestEditorFn{ v1.OjsAuthInterceptor(token, secret), } return nil }) if err != nil { panic(err) } resp, err := client.GetClustersWithResponse(context.Background()) if err != nil { panic(err) } sites, err := resp.Result() if err != nil { panic(err) } site := sites.Data[0] fmt.Println(site.DisplayName) }
Output: 石狩第1サイト
Example (Bucket) ¶
Example_bucket バケット操作
package main import ( "context" "fmt" "os" v1 "github.com/sacloud/object-storage-api-go/apis/v1" ) var serverURL = "https://secure.sakura.ad.jp/cloud/zone/is1a/api/objectstorage/1.0" func main() { token := os.Getenv("SAKURACLOUD_ACCESS_TOKEN") secret := os.Getenv("SAKURACLOUD_ACCESS_TOKEN_SECRET") client, err := v1.NewClientWithResponses(serverURL, func(c *v1.Client) error { c.RequestEditors = []v1.RequestEditorFn{ v1.OjsAuthInterceptor(token, secret), } return nil }) if err != nil { panic(err) } // サイトIDが必要になるためまずサイト一覧を取得 sitesResp, err := client.GetClustersWithResponse(context.Background()) if err != nil { panic(err) } sites, err := sitesResp.Result() if err != nil { panic(err) } siteId := sites.Data[0].Id // バケット作成 createParams := v1.CreateBucketJSONRequestBody{ ClusterId: siteId, } bucketResp, err := client.CreateBucketWithResponse(context.Background(), "bucket-name", createParams) if err != nil { panic(err) } bucket, err := bucketResp.Result() if err != nil { panic(err) } defer func() { deleteParams := v1.DeleteBucketJSONRequestBody{ ClusterId: siteId, } resp, err := client.DeleteBucketWithResponse(context.Background(), "bucket-name", deleteParams) if err != nil { panic(err) } if err := resp.Result(); err != nil { panic(err) } }() fmt.Println(bucket.Data.Name) }
Output: bucket-name
Example (PermissionKeys) ¶
Example_permissionKeys パーミッションのキー操作の例
package main import ( "context" "fmt" "os" v1 "github.com/sacloud/object-storage-api-go/apis/v1" ) var serverURL = "https://secure.sakura.ad.jp/cloud/zone/is1a/api/objectstorage/1.0" func main() { token := os.Getenv("SAKURACLOUD_ACCESS_TOKEN") secret := os.Getenv("SAKURACLOUD_ACCESS_TOKEN_SECRET") client, err := v1.NewClientWithResponses(serverURL, func(c *v1.Client) error { c.RequestEditors = []v1.RequestEditorFn{ v1.OjsAuthInterceptor(token, secret), } return nil }) if err != nil { panic(err) } // サイトIDが必要になるためまずサイト一覧を取得 sitesResp, err := client.GetClustersWithResponse(context.Background()) if err != nil { panic(err) } sites, err := sitesResp.Result() if err != nil { panic(err) } siteId := sites.Data[0].Id // パーミッション作成 permissionResp, err := client.CreatePermissionWithResponse(context.Background(), siteId, v1.CreatePermissionJSONRequestBody{ BucketControls: v1.BucketControls{ { BucketName: "bucket1", CanRead: true, CanWrite: true, }, }, DisplayName: "foobar", }) if err != nil { panic(err) } permission, err := permissionResp.Result() if err != nil { panic(err) } // パーミッションのキーを作成 keyResp, err := client.CreatePermissionKeyWithResponse(context.Background(), siteId, permission.Data.Id) if err != nil { panic(err) } key, err := keyResp.Result() if err != nil { panic(err) } defer func() { keyDeleteResp, err := client.DeletePermissionKeyWithResponse(context.Background(), siteId, permission.Data.Id, key.Data.Id) if err != nil { panic(err) } if err := keyDeleteResp.Result(); err != nil { panic(err) } permDeleteResp, err := client.DeletePermissionWithResponse(context.Background(), siteId, permission.Data.Id) if err != nil { panic(err) } if err := permDeleteResp.Result(); err != nil { panic(err) } }() fmt.Println(key.Data.Secret) }
Output: secret
Example (Permissions) ¶
Example_permissions パーミッション操作の例
package main import ( "context" "fmt" "os" v1 "github.com/sacloud/object-storage-api-go/apis/v1" ) var serverURL = "https://secure.sakura.ad.jp/cloud/zone/is1a/api/objectstorage/1.0" func main() { token := os.Getenv("SAKURACLOUD_ACCESS_TOKEN") secret := os.Getenv("SAKURACLOUD_ACCESS_TOKEN_SECRET") client, err := v1.NewClientWithResponses(serverURL, func(c *v1.Client) error { c.RequestEditors = []v1.RequestEditorFn{ v1.OjsAuthInterceptor(token, secret), } return nil }) if err != nil { panic(err) } // サイトIDが必要になるためまずサイト一覧を取得 sitesResp, err := client.GetClustersWithResponse(context.Background()) if err != nil { panic(err) } sites, err := sitesResp.Result() if err != nil { panic(err) } siteId := sites.Data[0].Id // パーミッション作成 permissionResp, err := client.CreatePermissionWithResponse(context.Background(), siteId, v1.CreatePermissionJSONRequestBody{ BucketControls: v1.BucketControls{ { BucketName: "bucket1", CanRead: true, CanWrite: true, }, }, DisplayName: "foobar", }) if err != nil { panic(err) } permission, err := permissionResp.Result() if err != nil { panic(err) } defer func() { resp, err := client.DeletePermissionWithResponse(context.Background(), siteId, permission.Data.Id) if err != nil { panic(err) } if err := resp.Result(); err != nil { panic(err) } }() fmt.Println(permission.Data.DisplayName) }
Output: foobar
Example (ReadSiteAccount) ¶
Example_readSiteAccount サイトアカウントの参照の例
package main import ( "context" "fmt" "os" v1 "github.com/sacloud/object-storage-api-go/apis/v1" ) var serverURL = "https://secure.sakura.ad.jp/cloud/zone/is1a/api/objectstorage/1.0" func main() { token := os.Getenv("SAKURACLOUD_ACCESS_TOKEN") secret := os.Getenv("SAKURACLOUD_ACCESS_TOKEN_SECRET") client, err := v1.NewClientWithResponses(serverURL, func(c *v1.Client) error { c.RequestEditors = []v1.RequestEditorFn{ v1.OjsAuthInterceptor(token, secret), } return nil }) if err != nil { panic(err) } // サイトIDが必要になるためまずサイト一覧を取得 sitesResp, err := client.GetClustersWithResponse(context.Background()) if err != nil { panic(err) } sites, err := sitesResp.Result() if err != nil { panic(err) } siteId := sites.Data[0].Id // サイトアカウントの参照 accountResp, err := client.GetAccountWithResponse(context.Background(), siteId) if err != nil { panic(err) } account, err := accountResp.Result() if err != nil { panic(err) } fmt.Println(account.Data.Code) }
Output: member@account@isk01
Example (SiteAccountKeys) ¶
Example_siteAccountKeys サイトアカウントのキー操作の例
package main import ( "context" "fmt" "os" v1 "github.com/sacloud/object-storage-api-go/apis/v1" ) var serverURL = "https://secure.sakura.ad.jp/cloud/zone/is1a/api/objectstorage/1.0" func main() { token := os.Getenv("SAKURACLOUD_ACCESS_TOKEN") secret := os.Getenv("SAKURACLOUD_ACCESS_TOKEN_SECRET") client, err := v1.NewClientWithResponses(serverURL, func(c *v1.Client) error { c.RequestEditors = []v1.RequestEditorFn{ v1.OjsAuthInterceptor(token, secret), } return nil }) if err != nil { panic(err) } // サイトIDが必要になるためまずサイト一覧を取得 sitesResp, err := client.GetClustersWithResponse(context.Background()) if err != nil { panic(err) } sites, err := sitesResp.Result() if err != nil { panic(err) } siteId := sites.Data[0].Id // サイトアカウントのキーを作成 keyResp, err := client.CreateAccountKeyWithResponse(context.Background(), siteId) if err != nil { panic(err) } key, err := keyResp.Result() if err != nil { panic(err) } fmt.Println(key.Data.Secret) }
Output: secret
Example (SiteStatus) ¶
Example_siteStatus サイトステータス確認の例
package main import ( "context" "fmt" "os" v1 "github.com/sacloud/object-storage-api-go/apis/v1" ) var serverURL = "https://secure.sakura.ad.jp/cloud/zone/is1a/api/objectstorage/1.0" func main() { token := os.Getenv("SAKURACLOUD_ACCESS_TOKEN") secret := os.Getenv("SAKURACLOUD_ACCESS_TOKEN_SECRET") client, err := v1.NewClientWithResponses(serverURL, func(c *v1.Client) error { c.RequestEditors = []v1.RequestEditorFn{ v1.OjsAuthInterceptor(token, secret), } return nil }) if err != nil { panic(err) } // サイトIDが必要になるためまずサイト一覧を取得 sitesResp, err := client.GetClustersWithResponse(context.Background()) if err != nil { panic(err) } sites, err := sitesResp.Result() if err != nil { panic(err) } siteId := sites.Data[0].Id statusResp, err := client.GetStatusWithResponse(context.Background(), siteId) if err != nil { panic(err) } status, err := statusResp.Result() if err != nil { panic(err) } fmt.Println(status.Data.StatusCode.Status) }
Output: ok
Index ¶
- func IsError400(err error) bool
- func IsError401(err error) bool
- func IsError403(err error) bool
- func IsError404(err error) bool
- func IsError409(err error) bool
- func NewCreateAccountKeyRequest(server string, siteId string) (*http.Request, error)
- func NewCreateAccountRequest(server string, siteId string) (*http.Request, error)
- func NewCreateBucketRequest(server string, bucketName BucketName, body CreateBucketJSONRequestBody) (*http.Request, error)
- func NewCreateBucketRequestWithBody(server string, bucketName BucketName, contentType string, body io.Reader) (*http.Request, error)
- func NewCreatePermissionKeyRequest(server string, siteId string, permissionId PermissionID) (*http.Request, error)
- func NewCreatePermissionRequest(server string, siteId string, body CreatePermissionJSONRequestBody) (*http.Request, error)
- func NewCreatePermissionRequestWithBody(server string, siteId string, contentType string, body io.Reader) (*http.Request, error)
- func NewDeleteAccountKeyRequest(server string, siteId string, accountKeyId AccessKeyID) (*http.Request, error)
- func NewDeleteAccountRequest(server string, siteId string) (*http.Request, error)
- func NewDeleteBucketRequest(server string, bucketName BucketName, body DeleteBucketJSONRequestBody) (*http.Request, error)
- func NewDeleteBucketRequestWithBody(server string, bucketName BucketName, contentType string, body io.Reader) (*http.Request, error)
- func NewDeletePermissionKeyRequest(server string, siteId string, permissionId PermissionID, ...) (*http.Request, error)
- func NewDeletePermissionRequest(server string, siteId string, permissionId PermissionID) (*http.Request, error)
- func NewGetAccountKeyRequest(server string, siteId string, accountKeyId AccessKeyID) (*http.Request, error)
- func NewGetAccountKeysRequest(server string, siteId string) (*http.Request, error)
- func NewGetAccountRequest(server string, siteId string) (*http.Request, error)
- func NewGetClusterRequest(server string, siteId string) (*http.Request, error)
- func NewGetClustersRequest(server string) (*http.Request, error)
- func NewGetPermissionKeyRequest(server string, siteId string, permissionId PermissionID, ...) (*http.Request, error)
- func NewGetPermissionKeysRequest(server string, siteId string, permissionId PermissionID) (*http.Request, error)
- func NewGetPermissionRequest(server string, siteId string, permissionId PermissionID) (*http.Request, error)
- func NewGetPermissionsRequest(server string, siteId string) (*http.Request, error)
- func NewGetStatusRequest(server string, siteId string) (*http.Request, error)
- func NewUpdatePermissionRequest(server string, siteId string, permissionId PermissionID, ...) (*http.Request, error)
- func NewUpdatePermissionRequestWithBody(server string, siteId string, permissionId PermissionID, contentType string, ...) (*http.Request, error)
- func OjsAuthInterceptor(token, secret string) func(context.Context, *http.Request) error
- func RegisterHandlers(router *gin.Engine, si ServerInterface) *gin.Engine
- func RegisterHandlersWithOptions(router *gin.Engine, si ServerInterface, options GinServerOptions) *gin.Engine
- type AccessKeyID
- type Account
- type AccountKey
- type AccountKeyResponseBody
- type AccountKeysResponseBody
- type AccountResponseBody
- type Bucket
- type BucketControl
- type BucketControls
- type BucketName
- type CanRead
- type CanWrite
- type Client
- func (c *Client) CreateAccount(ctx context.Context, siteId string, reqEditors ...RequestEditorFn) (*http.Response, error)
- func (c *Client) CreateAccountKey(ctx context.Context, siteId string, reqEditors ...RequestEditorFn) (*http.Response, error)
- func (c *Client) CreateBucket(ctx context.Context, bucketName BucketName, body CreateBucketJSONRequestBody, ...) (*http.Response, error)
- func (c *Client) CreateBucketWithBody(ctx context.Context, bucketName BucketName, contentType string, body io.Reader, ...) (*http.Response, error)
- func (c *Client) CreatePermission(ctx context.Context, siteId string, body CreatePermissionJSONRequestBody, ...) (*http.Response, error)
- func (c *Client) CreatePermissionKey(ctx context.Context, siteId string, permissionId PermissionID, ...) (*http.Response, error)
- func (c *Client) CreatePermissionWithBody(ctx context.Context, siteId string, contentType string, body io.Reader, ...) (*http.Response, error)
- func (c *Client) DeleteAccount(ctx context.Context, siteId string, reqEditors ...RequestEditorFn) (*http.Response, error)
- func (c *Client) DeleteAccountKey(ctx context.Context, siteId string, accountKeyId AccessKeyID, ...) (*http.Response, error)
- func (c *Client) DeleteBucket(ctx context.Context, bucketName BucketName, body DeleteBucketJSONRequestBody, ...) (*http.Response, error)
- func (c *Client) DeleteBucketWithBody(ctx context.Context, bucketName BucketName, contentType string, body io.Reader, ...) (*http.Response, error)
- func (c *Client) DeletePermission(ctx context.Context, siteId string, permissionId PermissionID, ...) (*http.Response, error)
- func (c *Client) DeletePermissionKey(ctx context.Context, siteId string, permissionId PermissionID, ...) (*http.Response, error)
- func (c *Client) GetAccount(ctx context.Context, siteId string, reqEditors ...RequestEditorFn) (*http.Response, error)
- func (c *Client) GetAccountKey(ctx context.Context, siteId string, accountKeyId AccessKeyID, ...) (*http.Response, error)
- func (c *Client) GetAccountKeys(ctx context.Context, siteId string, reqEditors ...RequestEditorFn) (*http.Response, error)
- func (c *Client) GetCluster(ctx context.Context, siteId string, reqEditors ...RequestEditorFn) (*http.Response, error)
- func (c *Client) GetClusters(ctx context.Context, reqEditors ...RequestEditorFn) (*http.Response, error)
- func (c *Client) GetPermission(ctx context.Context, siteId string, permissionId PermissionID, ...) (*http.Response, error)
- func (c *Client) GetPermissionKey(ctx context.Context, siteId string, permissionId PermissionID, ...) (*http.Response, error)
- func (c *Client) GetPermissionKeys(ctx context.Context, siteId string, permissionId PermissionID, ...) (*http.Response, error)
- func (c *Client) GetPermissions(ctx context.Context, siteId string, reqEditors ...RequestEditorFn) (*http.Response, error)
- func (c *Client) GetStatus(ctx context.Context, siteId string, reqEditors ...RequestEditorFn) (*http.Response, error)
- func (c *Client) UpdatePermission(ctx context.Context, siteId string, permissionId PermissionID, ...) (*http.Response, error)
- func (c *Client) UpdatePermissionWithBody(ctx context.Context, siteId string, permissionId PermissionID, ...) (*http.Response, error)
- type ClientInterface
- type ClientOption
- type ClientWithResponses
- func (c *ClientWithResponses) CreateAccountKeyWithResponse(ctx context.Context, siteId string, reqEditors ...RequestEditorFn) (*CreateAccountKeyResponse, error)
- func (c *ClientWithResponses) CreateAccountWithResponse(ctx context.Context, siteId string, reqEditors ...RequestEditorFn) (*CreateAccountResponse, error)
- func (c *ClientWithResponses) CreateBucketWithBodyWithResponse(ctx context.Context, bucketName BucketName, contentType string, body io.Reader, ...) (*CreateBucketResponse, error)
- func (c *ClientWithResponses) CreateBucketWithResponse(ctx context.Context, bucketName BucketName, body CreateBucketJSONRequestBody, ...) (*CreateBucketResponse, error)
- func (c *ClientWithResponses) CreatePermissionKeyWithResponse(ctx context.Context, siteId string, permissionId PermissionID, ...) (*CreatePermissionKeyResponse, error)
- func (c *ClientWithResponses) CreatePermissionWithBodyWithResponse(ctx context.Context, siteId string, contentType string, body io.Reader, ...) (*CreatePermissionResponse, error)
- func (c *ClientWithResponses) CreatePermissionWithResponse(ctx context.Context, siteId string, body CreatePermissionJSONRequestBody, ...) (*CreatePermissionResponse, error)
- func (c *ClientWithResponses) DeleteAccountKeyWithResponse(ctx context.Context, siteId string, accountKeyId AccessKeyID, ...) (*DeleteAccountKeyResponse, error)
- func (c *ClientWithResponses) DeleteAccountWithResponse(ctx context.Context, siteId string, reqEditors ...RequestEditorFn) (*DeleteAccountResponse, error)
- func (c *ClientWithResponses) DeleteBucketWithBodyWithResponse(ctx context.Context, bucketName BucketName, contentType string, body io.Reader, ...) (*DeleteBucketResponse, error)
- func (c *ClientWithResponses) DeleteBucketWithResponse(ctx context.Context, bucketName BucketName, body DeleteBucketJSONRequestBody, ...) (*DeleteBucketResponse, error)
- func (c *ClientWithResponses) DeletePermissionKeyWithResponse(ctx context.Context, siteId string, permissionId PermissionID, ...) (*DeletePermissionKeyResponse, error)
- func (c *ClientWithResponses) DeletePermissionWithResponse(ctx context.Context, siteId string, permissionId PermissionID, ...) (*DeletePermissionResponse, error)
- func (c *ClientWithResponses) GetAccountKeyWithResponse(ctx context.Context, siteId string, accountKeyId AccessKeyID, ...) (*GetAccountKeyResponse, error)
- func (c *ClientWithResponses) GetAccountKeysWithResponse(ctx context.Context, siteId string, reqEditors ...RequestEditorFn) (*GetAccountKeysResponse, error)
- func (c *ClientWithResponses) GetAccountWithResponse(ctx context.Context, siteId string, reqEditors ...RequestEditorFn) (*GetAccountResponse, error)
- func (c *ClientWithResponses) GetClusterWithResponse(ctx context.Context, siteId string, reqEditors ...RequestEditorFn) (*GetClusterResponse, error)
- func (c *ClientWithResponses) GetClustersWithResponse(ctx context.Context, reqEditors ...RequestEditorFn) (*GetClustersResponse, error)
- func (c *ClientWithResponses) GetPermissionKeyWithResponse(ctx context.Context, siteId string, permissionId PermissionID, ...) (*GetPermissionKeyResponse, error)
- func (c *ClientWithResponses) GetPermissionKeysWithResponse(ctx context.Context, siteId string, permissionId PermissionID, ...) (*GetPermissionKeysResponse, error)
- func (c *ClientWithResponses) GetPermissionWithResponse(ctx context.Context, siteId string, permissionId PermissionID, ...) (*GetPermissionResponse, error)
- func (c *ClientWithResponses) GetPermissionsWithResponse(ctx context.Context, siteId string, reqEditors ...RequestEditorFn) (*GetPermissionsResponse, error)
- func (c *ClientWithResponses) GetStatusWithResponse(ctx context.Context, siteId string, reqEditors ...RequestEditorFn) (*GetStatusResponse, error)
- func (c *ClientWithResponses) UpdatePermissionWithBodyWithResponse(ctx context.Context, siteId string, permissionId PermissionID, ...) (*UpdatePermissionResponse, error)
- func (c *ClientWithResponses) UpdatePermissionWithResponse(ctx context.Context, siteId string, permissionId PermissionID, ...) (*UpdatePermissionResponse, error)
- type ClientWithResponsesInterface
- type Cluster
- type Code
- type CreateAccountKeyResponse
- type CreateAccountResponse
- type CreateBucketJSONBody
- type CreateBucketJSONRequestBody
- type CreateBucketRequestBody
- type CreateBucketResponse
- type CreateBucketResponseBody
- type CreatePermissionJSONBody
- type CreatePermissionJSONRequestBody
- type CreatePermissionKeyResponse
- type CreatePermissionParams
- type CreatePermissionResponse
- type CreatedAt
- type DeleteAccountKeyResponse
- type DeleteAccountResponse
- type DeleteBucketJSONBody
- type DeleteBucketJSONRequestBody
- type DeleteBucketResponse
- type DeletePermissionKeyResponse
- type DeletePermissionResponse
- type DisplayName
- type Error
- type Error400
- type Error401
- type Error403
- type Error404
- type Error409
- type ErrorCode
- type ErrorDefault
- type ErrorDetail
- type ErrorMessage
- type ErrorTraceId
- type Errors
- type ErrorsDomain
- type ErrorsLocation
- type ErrorsLocationType
- type ErrorsMessage
- type ErrorsReason
- type GetAccountKeyResponse
- type GetAccountKeysResponse
- type GetAccountResponse
- type GetClusterResponse
- type GetClustersResponse
- type GetPermissionKeyResponse
- type GetPermissionKeysResponse
- type GetPermissionResponse
- type GetPermissionsResponse
- type GetStatusResponse
- type GinServerOptions
- type HttpRequestDoer
- type ListClustersResponseBody
- type MiddlewareFunc
- type Permission
- type PermissionID
- type PermissionKey
- type PermissionKeyResponseBody
- type PermissionKeys
- type PermissionKeysResponseBody
- type PermissionRequestBody
- type PermissionResponseBody
- type PermissionSecret
- type Permissions
- type PermissionsResponseBody
- type ReadClusterResponseBody
- type RequestEditorFn
- type ResourceID
- type SecretAccessKey
- type ServerInterface
- type ServerInterfaceWrapper
- func (siw *ServerInterfaceWrapper) CreateAccount(c *gin.Context)
- func (siw *ServerInterfaceWrapper) CreateAccountKey(c *gin.Context)
- func (siw *ServerInterfaceWrapper) CreateBucket(c *gin.Context)
- func (siw *ServerInterfaceWrapper) CreatePermission(c *gin.Context)
- func (siw *ServerInterfaceWrapper) CreatePermissionKey(c *gin.Context)
- func (siw *ServerInterfaceWrapper) DeleteAccount(c *gin.Context)
- func (siw *ServerInterfaceWrapper) DeleteAccountKey(c *gin.Context)
- func (siw *ServerInterfaceWrapper) DeleteBucket(c *gin.Context)
- func (siw *ServerInterfaceWrapper) DeletePermission(c *gin.Context)
- func (siw *ServerInterfaceWrapper) DeletePermissionKey(c *gin.Context)
- func (siw *ServerInterfaceWrapper) GetAccount(c *gin.Context)
- func (siw *ServerInterfaceWrapper) GetAccountKey(c *gin.Context)
- func (siw *ServerInterfaceWrapper) GetAccountKeys(c *gin.Context)
- func (siw *ServerInterfaceWrapper) GetCluster(c *gin.Context)
- func (siw *ServerInterfaceWrapper) GetClusters(c *gin.Context)
- func (siw *ServerInterfaceWrapper) GetPermission(c *gin.Context)
- func (siw *ServerInterfaceWrapper) GetPermissionKey(c *gin.Context)
- func (siw *ServerInterfaceWrapper) GetPermissionKeys(c *gin.Context)
- func (siw *ServerInterfaceWrapper) GetPermissions(c *gin.Context)
- func (siw *ServerInterfaceWrapper) GetStatus(c *gin.Context)
- func (siw *ServerInterfaceWrapper) UpdatePermission(c *gin.Context)
- type Status
- type StatusCode
- type StatusResponseBody
- type UpdatePermissionJSONBody
- type UpdatePermissionJSONRequestBody
- type UpdatePermissionParams
- type UpdatePermissionResponse
Examples ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func IsError400 ¶ added in v0.0.5
func IsError401 ¶ added in v0.0.5
func IsError403 ¶ added in v0.0.5
func IsError404 ¶ added in v0.0.5
func IsError409 ¶ added in v0.0.5
func NewCreateAccountKeyRequest ¶ added in v0.0.2
NewCreateAccountKeyRequest generates requests for CreateAccountKey
func NewCreateAccountRequest ¶ added in v0.0.2
NewCreateAccountRequest generates requests for CreateAccount
func NewCreateBucketRequest ¶
func NewCreateBucketRequest(server string, bucketName BucketName, body CreateBucketJSONRequestBody) (*http.Request, error)
NewCreateBucketRequest calls the generic CreateBucket builder with application/json body
func NewCreateBucketRequestWithBody ¶
func NewCreateBucketRequestWithBody(server string, bucketName BucketName, contentType string, body io.Reader) (*http.Request, error)
NewCreateBucketRequestWithBody generates requests for CreateBucket with any type of body
func NewCreatePermissionKeyRequest ¶ added in v0.0.2
func NewCreatePermissionKeyRequest(server string, siteId string, permissionId PermissionID) (*http.Request, error)
NewCreatePermissionKeyRequest generates requests for CreatePermissionKey
func NewCreatePermissionRequest ¶
func NewCreatePermissionRequest(server string, siteId string, body CreatePermissionJSONRequestBody) (*http.Request, error)
NewCreatePermissionRequest calls the generic CreatePermission builder with application/json body
func NewCreatePermissionRequestWithBody ¶
func NewCreatePermissionRequestWithBody(server string, siteId string, contentType string, body io.Reader) (*http.Request, error)
NewCreatePermissionRequestWithBody generates requests for CreatePermission with any type of body
func NewDeleteAccountKeyRequest ¶ added in v0.0.2
func NewDeleteAccountKeyRequest(server string, siteId string, accountKeyId AccessKeyID) (*http.Request, error)
NewDeleteAccountKeyRequest generates requests for DeleteAccountKey
func NewDeleteAccountRequest ¶ added in v0.0.2
NewDeleteAccountRequest generates requests for DeleteAccount
func NewDeleteBucketRequest ¶
func NewDeleteBucketRequest(server string, bucketName BucketName, body DeleteBucketJSONRequestBody) (*http.Request, error)
NewDeleteBucketRequest calls the generic DeleteBucket builder with application/json body
func NewDeleteBucketRequestWithBody ¶
func NewDeleteBucketRequestWithBody(server string, bucketName BucketName, contentType string, body io.Reader) (*http.Request, error)
NewDeleteBucketRequestWithBody generates requests for DeleteBucket with any type of body
func NewDeletePermissionKeyRequest ¶ added in v0.0.2
func NewDeletePermissionKeyRequest(server string, siteId string, permissionId PermissionID, permissionKeyId AccessKeyID) (*http.Request, error)
NewDeletePermissionKeyRequest generates requests for DeletePermissionKey
func NewDeletePermissionRequest ¶
func NewDeletePermissionRequest(server string, siteId string, permissionId PermissionID) (*http.Request, error)
NewDeletePermissionRequest generates requests for DeletePermission
func NewGetAccountKeyRequest ¶ added in v0.0.2
func NewGetAccountKeyRequest(server string, siteId string, accountKeyId AccessKeyID) (*http.Request, error)
NewGetAccountKeyRequest generates requests for GetAccountKey
func NewGetAccountKeysRequest ¶ added in v0.0.2
NewGetAccountKeysRequest generates requests for GetAccountKeys
func NewGetAccountRequest ¶ added in v0.0.2
NewGetAccountRequest generates requests for GetAccount
func NewGetClusterRequest ¶ added in v0.0.2
NewGetClusterRequest generates requests for GetCluster
func NewGetClustersRequest ¶ added in v0.0.2
NewGetClustersRequest generates requests for GetClusters
func NewGetPermissionKeyRequest ¶ added in v0.0.2
func NewGetPermissionKeyRequest(server string, siteId string, permissionId PermissionID, permissionKeyId AccessKeyID) (*http.Request, error)
NewGetPermissionKeyRequest generates requests for GetPermissionKey
func NewGetPermissionKeysRequest ¶ added in v0.0.2
func NewGetPermissionKeysRequest(server string, siteId string, permissionId PermissionID) (*http.Request, error)
NewGetPermissionKeysRequest generates requests for GetPermissionKeys
func NewGetPermissionRequest ¶ added in v0.0.2
func NewGetPermissionRequest(server string, siteId string, permissionId PermissionID) (*http.Request, error)
NewGetPermissionRequest generates requests for GetPermission
func NewGetPermissionsRequest ¶ added in v0.0.2
NewGetPermissionsRequest generates requests for GetPermissions
func NewGetStatusRequest ¶ added in v0.0.2
NewGetStatusRequest generates requests for GetStatus
func NewUpdatePermissionRequest ¶
func NewUpdatePermissionRequest(server string, siteId string, permissionId PermissionID, body UpdatePermissionJSONRequestBody) (*http.Request, error)
NewUpdatePermissionRequest calls the generic UpdatePermission builder with application/json body
func NewUpdatePermissionRequestWithBody ¶
func NewUpdatePermissionRequestWithBody(server string, siteId string, permissionId PermissionID, contentType string, body io.Reader) (*http.Request, error)
NewUpdatePermissionRequestWithBody generates requests for UpdatePermission with any type of body
func OjsAuthInterceptor ¶
OjsAuthInterceptor オブジェクトストレージAPIリクエストに認証情報の注入を行う
func RegisterHandlers ¶
func RegisterHandlers(router *gin.Engine, si ServerInterface) *gin.Engine
RegisterHandlers creates http.Handler with routing matching OpenAPI spec.
func RegisterHandlersWithOptions ¶
func RegisterHandlersWithOptions(router *gin.Engine, si ServerInterface, options GinServerOptions) *gin.Engine
RegisterHandlersWithOptions creates http.Handler with additional options
Types ¶
type Account ¶
type Account struct { // Code Code Code `json:"code"` // Created at CreatedAt CreatedAt `json:"created_at"` // Resource ID ResourceId ResourceID `json:"resource_id"` }
Account info
type AccountKey ¶
type AccountKey struct { // Created at CreatedAt CreatedAt `json:"created_at"` // Access key ID Id AccessKeyID `json:"id"` // Secret Access key Secret SecretAccessKey `json:"secret"` }
Root user access key
type AccountKeyResponseBody ¶
type AccountKeyResponseBody struct { // Root user access key Data AccountKey `json:"data"` }
Root user access key
type AccountKeysResponseBody ¶
type AccountKeysResponseBody struct { // data type Data []AccountKey `json:"data"` }
Root user access keys
type AccountResponseBody ¶
type AccountResponseBody struct { // Account info Data Account `json:"data"` }
Account info
type BucketControl ¶
type BucketControl struct { // Bucket name BucketName BucketName `json:"bucket_name"` // The flag to read bucket contents CanRead CanRead `json:"can_read"` // The flag to write bucket contents CanWrite CanWrite `json:"can_write"` // Created at CreatedAt CreatedAt `json:"created_at"` }
Bucket control
type Client ¶
type Client struct { // The endpoint of the server conforming to this interface, with scheme, // https://api.deepmap.com for example. This can contain a path relative // to the server, such as https://api.deepmap.com/dev-test, and all the // paths in the swagger spec will be appended to the server. Server string // Doer for performing requests, typically a *http.Client with any // customized settings, such as certificate chains. Client HttpRequestDoer // A list of callbacks for modifying requests which are generated before sending over // the network. RequestEditors []RequestEditorFn }
Client which conforms to the OpenAPI3 specification for this service.
func NewClient ¶
func NewClient(server string, opts ...ClientOption) (*Client, error)
Creates a new Client, with reasonable defaults
func (*Client) CreateAccount ¶ added in v0.0.2
func (*Client) CreateAccountKey ¶ added in v0.0.2
func (*Client) CreateBucket ¶
func (c *Client) CreateBucket(ctx context.Context, bucketName BucketName, body CreateBucketJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)
func (*Client) CreateBucketWithBody ¶
func (*Client) CreatePermission ¶
func (c *Client) CreatePermission(ctx context.Context, siteId string, body CreatePermissionJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)
func (*Client) CreatePermissionKey ¶ added in v0.0.2
func (c *Client) CreatePermissionKey(ctx context.Context, siteId string, permissionId PermissionID, reqEditors ...RequestEditorFn) (*http.Response, error)
func (*Client) CreatePermissionWithBody ¶
func (*Client) DeleteAccount ¶ added in v0.0.2
func (*Client) DeleteAccountKey ¶ added in v0.0.2
func (c *Client) DeleteAccountKey(ctx context.Context, siteId string, accountKeyId AccessKeyID, reqEditors ...RequestEditorFn) (*http.Response, error)
func (*Client) DeleteBucket ¶
func (c *Client) DeleteBucket(ctx context.Context, bucketName BucketName, body DeleteBucketJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)
func (*Client) DeleteBucketWithBody ¶
func (*Client) DeletePermission ¶
func (c *Client) DeletePermission(ctx context.Context, siteId string, permissionId PermissionID, reqEditors ...RequestEditorFn) (*http.Response, error)
func (*Client) DeletePermissionKey ¶ added in v0.0.2
func (c *Client) DeletePermissionKey(ctx context.Context, siteId string, permissionId PermissionID, permissionKeyId AccessKeyID, reqEditors ...RequestEditorFn) (*http.Response, error)
func (*Client) GetAccount ¶ added in v0.0.2
func (*Client) GetAccountKey ¶ added in v0.0.2
func (c *Client) GetAccountKey(ctx context.Context, siteId string, accountKeyId AccessKeyID, reqEditors ...RequestEditorFn) (*http.Response, error)
func (*Client) GetAccountKeys ¶ added in v0.0.2
func (*Client) GetCluster ¶ added in v0.0.2
func (*Client) GetClusters ¶ added in v0.0.2
func (*Client) GetPermission ¶ added in v0.0.2
func (c *Client) GetPermission(ctx context.Context, siteId string, permissionId PermissionID, reqEditors ...RequestEditorFn) (*http.Response, error)
func (*Client) GetPermissionKey ¶ added in v0.0.2
func (c *Client) GetPermissionKey(ctx context.Context, siteId string, permissionId PermissionID, permissionKeyId AccessKeyID, reqEditors ...RequestEditorFn) (*http.Response, error)
func (*Client) GetPermissionKeys ¶ added in v0.0.2
func (c *Client) GetPermissionKeys(ctx context.Context, siteId string, permissionId PermissionID, reqEditors ...RequestEditorFn) (*http.Response, error)
func (*Client) GetPermissions ¶ added in v0.0.2
func (*Client) UpdatePermission ¶
func (c *Client) UpdatePermission(ctx context.Context, siteId string, permissionId PermissionID, body UpdatePermissionJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)
func (*Client) UpdatePermissionWithBody ¶
type ClientInterface ¶
type ClientInterface interface { // DeleteBucket request with any body DeleteBucketWithBody(ctx context.Context, bucketName BucketName, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) DeleteBucket(ctx context.Context, bucketName BucketName, body DeleteBucketJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) // CreateBucket request with any body CreateBucketWithBody(ctx context.Context, bucketName BucketName, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) CreateBucket(ctx context.Context, bucketName BucketName, body CreateBucketJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) // GetClusters request GetClusters(ctx context.Context, reqEditors ...RequestEditorFn) (*http.Response, error) // GetCluster request GetCluster(ctx context.Context, siteId string, reqEditors ...RequestEditorFn) (*http.Response, error) // DeleteAccount request DeleteAccount(ctx context.Context, siteId string, reqEditors ...RequestEditorFn) (*http.Response, error) // GetAccount request GetAccount(ctx context.Context, siteId string, reqEditors ...RequestEditorFn) (*http.Response, error) // CreateAccount request CreateAccount(ctx context.Context, siteId string, reqEditors ...RequestEditorFn) (*http.Response, error) // GetAccountKeys request GetAccountKeys(ctx context.Context, siteId string, reqEditors ...RequestEditorFn) (*http.Response, error) // CreateAccountKey request CreateAccountKey(ctx context.Context, siteId string, reqEditors ...RequestEditorFn) (*http.Response, error) // DeleteAccountKey request DeleteAccountKey(ctx context.Context, siteId string, accountKeyId AccessKeyID, reqEditors ...RequestEditorFn) (*http.Response, error) // GetAccountKey request GetAccountKey(ctx context.Context, siteId string, accountKeyId AccessKeyID, reqEditors ...RequestEditorFn) (*http.Response, error) // GetPermissions request GetPermissions(ctx context.Context, siteId string, reqEditors ...RequestEditorFn) (*http.Response, error) // CreatePermission request with any body CreatePermissionWithBody(ctx context.Context, siteId string, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) CreatePermission(ctx context.Context, siteId string, body CreatePermissionJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) // DeletePermission request DeletePermission(ctx context.Context, siteId string, permissionId PermissionID, reqEditors ...RequestEditorFn) (*http.Response, error) // GetPermission request GetPermission(ctx context.Context, siteId string, permissionId PermissionID, reqEditors ...RequestEditorFn) (*http.Response, error) // UpdatePermission request with any body UpdatePermissionWithBody(ctx context.Context, siteId string, permissionId PermissionID, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) UpdatePermission(ctx context.Context, siteId string, permissionId PermissionID, body UpdatePermissionJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) // GetPermissionKeys request GetPermissionKeys(ctx context.Context, siteId string, permissionId PermissionID, reqEditors ...RequestEditorFn) (*http.Response, error) // CreatePermissionKey request CreatePermissionKey(ctx context.Context, siteId string, permissionId PermissionID, reqEditors ...RequestEditorFn) (*http.Response, error) // DeletePermissionKey request DeletePermissionKey(ctx context.Context, siteId string, permissionId PermissionID, permissionKeyId AccessKeyID, reqEditors ...RequestEditorFn) (*http.Response, error) // GetPermissionKey request GetPermissionKey(ctx context.Context, siteId string, permissionId PermissionID, permissionKeyId AccessKeyID, reqEditors ...RequestEditorFn) (*http.Response, error) // GetStatus request GetStatus(ctx context.Context, siteId string, reqEditors ...RequestEditorFn) (*http.Response, error) }
The interface specification for the client above.
type ClientOption ¶
ClientOption allows setting custom parameters during construction
func WithHTTPClient ¶
func WithHTTPClient(doer HttpRequestDoer) ClientOption
WithHTTPClient allows overriding the default Doer, which is automatically created using http.Client. This is useful for tests.
func WithRequestEditorFn ¶
func WithRequestEditorFn(fn RequestEditorFn) ClientOption
WithRequestEditorFn allows setting up a callback function, which will be called right before sending the request. This can be used to mutate the request.
type ClientWithResponses ¶
type ClientWithResponses struct {
ClientInterface
}
ClientWithResponses builds on ClientInterface to offer response payloads
func NewClientWithResponses ¶
func NewClientWithResponses(server string, opts ...ClientOption) (*ClientWithResponses, error)
NewClientWithResponses creates a new ClientWithResponses, which wraps Client with return type handling
func (*ClientWithResponses) CreateAccountKeyWithResponse ¶ added in v0.0.2
func (c *ClientWithResponses) CreateAccountKeyWithResponse(ctx context.Context, siteId string, reqEditors ...RequestEditorFn) (*CreateAccountKeyResponse, error)
CreateAccountKeyWithResponse request returning *CreateAccountKeyResponse
func (*ClientWithResponses) CreateAccountWithResponse ¶ added in v0.0.2
func (c *ClientWithResponses) CreateAccountWithResponse(ctx context.Context, siteId string, reqEditors ...RequestEditorFn) (*CreateAccountResponse, error)
CreateAccountWithResponse request returning *CreateAccountResponse
func (*ClientWithResponses) CreateBucketWithBodyWithResponse ¶
func (c *ClientWithResponses) CreateBucketWithBodyWithResponse(ctx context.Context, bucketName BucketName, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*CreateBucketResponse, error)
CreateBucketWithBodyWithResponse request with arbitrary body returning *CreateBucketResponse
func (*ClientWithResponses) CreateBucketWithResponse ¶
func (c *ClientWithResponses) CreateBucketWithResponse(ctx context.Context, bucketName BucketName, body CreateBucketJSONRequestBody, reqEditors ...RequestEditorFn) (*CreateBucketResponse, error)
func (*ClientWithResponses) CreatePermissionKeyWithResponse ¶ added in v0.0.2
func (c *ClientWithResponses) CreatePermissionKeyWithResponse(ctx context.Context, siteId string, permissionId PermissionID, reqEditors ...RequestEditorFn) (*CreatePermissionKeyResponse, error)
CreatePermissionKeyWithResponse request returning *CreatePermissionKeyResponse
func (*ClientWithResponses) CreatePermissionWithBodyWithResponse ¶
func (c *ClientWithResponses) CreatePermissionWithBodyWithResponse(ctx context.Context, siteId string, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*CreatePermissionResponse, error)
CreatePermissionWithBodyWithResponse request with arbitrary body returning *CreatePermissionResponse
func (*ClientWithResponses) CreatePermissionWithResponse ¶
func (c *ClientWithResponses) CreatePermissionWithResponse(ctx context.Context, siteId string, body CreatePermissionJSONRequestBody, reqEditors ...RequestEditorFn) (*CreatePermissionResponse, error)
func (*ClientWithResponses) DeleteAccountKeyWithResponse ¶ added in v0.0.2
func (c *ClientWithResponses) DeleteAccountKeyWithResponse(ctx context.Context, siteId string, accountKeyId AccessKeyID, reqEditors ...RequestEditorFn) (*DeleteAccountKeyResponse, error)
DeleteAccountKeyWithResponse request returning *DeleteAccountKeyResponse
func (*ClientWithResponses) DeleteAccountWithResponse ¶ added in v0.0.2
func (c *ClientWithResponses) DeleteAccountWithResponse(ctx context.Context, siteId string, reqEditors ...RequestEditorFn) (*DeleteAccountResponse, error)
DeleteAccountWithResponse request returning *DeleteAccountResponse
func (*ClientWithResponses) DeleteBucketWithBodyWithResponse ¶
func (c *ClientWithResponses) DeleteBucketWithBodyWithResponse(ctx context.Context, bucketName BucketName, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*DeleteBucketResponse, error)
DeleteBucketWithBodyWithResponse request with arbitrary body returning *DeleteBucketResponse
func (*ClientWithResponses) DeleteBucketWithResponse ¶
func (c *ClientWithResponses) DeleteBucketWithResponse(ctx context.Context, bucketName BucketName, body DeleteBucketJSONRequestBody, reqEditors ...RequestEditorFn) (*DeleteBucketResponse, error)
func (*ClientWithResponses) DeletePermissionKeyWithResponse ¶ added in v0.0.2
func (c *ClientWithResponses) DeletePermissionKeyWithResponse(ctx context.Context, siteId string, permissionId PermissionID, permissionKeyId AccessKeyID, reqEditors ...RequestEditorFn) (*DeletePermissionKeyResponse, error)
DeletePermissionKeyWithResponse request returning *DeletePermissionKeyResponse
func (*ClientWithResponses) DeletePermissionWithResponse ¶
func (c *ClientWithResponses) DeletePermissionWithResponse(ctx context.Context, siteId string, permissionId PermissionID, reqEditors ...RequestEditorFn) (*DeletePermissionResponse, error)
DeletePermissionWithResponse request returning *DeletePermissionResponse
func (*ClientWithResponses) GetAccountKeyWithResponse ¶ added in v0.0.2
func (c *ClientWithResponses) GetAccountKeyWithResponse(ctx context.Context, siteId string, accountKeyId AccessKeyID, reqEditors ...RequestEditorFn) (*GetAccountKeyResponse, error)
GetAccountKeyWithResponse request returning *GetAccountKeyResponse
func (*ClientWithResponses) GetAccountKeysWithResponse ¶ added in v0.0.2
func (c *ClientWithResponses) GetAccountKeysWithResponse(ctx context.Context, siteId string, reqEditors ...RequestEditorFn) (*GetAccountKeysResponse, error)
GetAccountKeysWithResponse request returning *GetAccountKeysResponse
func (*ClientWithResponses) GetAccountWithResponse ¶ added in v0.0.2
func (c *ClientWithResponses) GetAccountWithResponse(ctx context.Context, siteId string, reqEditors ...RequestEditorFn) (*GetAccountResponse, error)
GetAccountWithResponse request returning *GetAccountResponse
func (*ClientWithResponses) GetClusterWithResponse ¶ added in v0.0.2
func (c *ClientWithResponses) GetClusterWithResponse(ctx context.Context, siteId string, reqEditors ...RequestEditorFn) (*GetClusterResponse, error)
GetClusterWithResponse request returning *GetClusterResponse
func (*ClientWithResponses) GetClustersWithResponse ¶ added in v0.0.2
func (c *ClientWithResponses) GetClustersWithResponse(ctx context.Context, reqEditors ...RequestEditorFn) (*GetClustersResponse, error)
GetClustersWithResponse request returning *GetClustersResponse
func (*ClientWithResponses) GetPermissionKeyWithResponse ¶ added in v0.0.2
func (c *ClientWithResponses) GetPermissionKeyWithResponse(ctx context.Context, siteId string, permissionId PermissionID, permissionKeyId AccessKeyID, reqEditors ...RequestEditorFn) (*GetPermissionKeyResponse, error)
GetPermissionKeyWithResponse request returning *GetPermissionKeyResponse
func (*ClientWithResponses) GetPermissionKeysWithResponse ¶ added in v0.0.2
func (c *ClientWithResponses) GetPermissionKeysWithResponse(ctx context.Context, siteId string, permissionId PermissionID, reqEditors ...RequestEditorFn) (*GetPermissionKeysResponse, error)
GetPermissionKeysWithResponse request returning *GetPermissionKeysResponse
func (*ClientWithResponses) GetPermissionWithResponse ¶ added in v0.0.2
func (c *ClientWithResponses) GetPermissionWithResponse(ctx context.Context, siteId string, permissionId PermissionID, reqEditors ...RequestEditorFn) (*GetPermissionResponse, error)
GetPermissionWithResponse request returning *GetPermissionResponse
func (*ClientWithResponses) GetPermissionsWithResponse ¶ added in v0.0.2
func (c *ClientWithResponses) GetPermissionsWithResponse(ctx context.Context, siteId string, reqEditors ...RequestEditorFn) (*GetPermissionsResponse, error)
GetPermissionsWithResponse request returning *GetPermissionsResponse
func (*ClientWithResponses) GetStatusWithResponse ¶ added in v0.0.2
func (c *ClientWithResponses) GetStatusWithResponse(ctx context.Context, siteId string, reqEditors ...RequestEditorFn) (*GetStatusResponse, error)
GetStatusWithResponse request returning *GetStatusResponse
func (*ClientWithResponses) UpdatePermissionWithBodyWithResponse ¶
func (c *ClientWithResponses) UpdatePermissionWithBodyWithResponse(ctx context.Context, siteId string, permissionId PermissionID, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*UpdatePermissionResponse, error)
UpdatePermissionWithBodyWithResponse request with arbitrary body returning *UpdatePermissionResponse
func (*ClientWithResponses) UpdatePermissionWithResponse ¶
func (c *ClientWithResponses) UpdatePermissionWithResponse(ctx context.Context, siteId string, permissionId PermissionID, body UpdatePermissionJSONRequestBody, reqEditors ...RequestEditorFn) (*UpdatePermissionResponse, error)
type ClientWithResponsesInterface ¶
type ClientWithResponsesInterface interface { // DeleteBucket request with any body DeleteBucketWithBodyWithResponse(ctx context.Context, bucketName BucketName, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*DeleteBucketResponse, error) DeleteBucketWithResponse(ctx context.Context, bucketName BucketName, body DeleteBucketJSONRequestBody, reqEditors ...RequestEditorFn) (*DeleteBucketResponse, error) // CreateBucket request with any body CreateBucketWithBodyWithResponse(ctx context.Context, bucketName BucketName, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*CreateBucketResponse, error) CreateBucketWithResponse(ctx context.Context, bucketName BucketName, body CreateBucketJSONRequestBody, reqEditors ...RequestEditorFn) (*CreateBucketResponse, error) // GetClusters request GetClustersWithResponse(ctx context.Context, reqEditors ...RequestEditorFn) (*GetClustersResponse, error) // GetCluster request GetClusterWithResponse(ctx context.Context, siteId string, reqEditors ...RequestEditorFn) (*GetClusterResponse, error) // DeleteAccount request DeleteAccountWithResponse(ctx context.Context, siteId string, reqEditors ...RequestEditorFn) (*DeleteAccountResponse, error) // GetAccount request GetAccountWithResponse(ctx context.Context, siteId string, reqEditors ...RequestEditorFn) (*GetAccountResponse, error) // CreateAccount request CreateAccountWithResponse(ctx context.Context, siteId string, reqEditors ...RequestEditorFn) (*CreateAccountResponse, error) // GetAccountKeys request GetAccountKeysWithResponse(ctx context.Context, siteId string, reqEditors ...RequestEditorFn) (*GetAccountKeysResponse, error) // CreateAccountKey request CreateAccountKeyWithResponse(ctx context.Context, siteId string, reqEditors ...RequestEditorFn) (*CreateAccountKeyResponse, error) // DeleteAccountKey request DeleteAccountKeyWithResponse(ctx context.Context, siteId string, accountKeyId AccessKeyID, reqEditors ...RequestEditorFn) (*DeleteAccountKeyResponse, error) // GetAccountKey request GetAccountKeyWithResponse(ctx context.Context, siteId string, accountKeyId AccessKeyID, reqEditors ...RequestEditorFn) (*GetAccountKeyResponse, error) // GetPermissions request GetPermissionsWithResponse(ctx context.Context, siteId string, reqEditors ...RequestEditorFn) (*GetPermissionsResponse, error) // CreatePermission request with any body CreatePermissionWithBodyWithResponse(ctx context.Context, siteId string, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*CreatePermissionResponse, error) CreatePermissionWithResponse(ctx context.Context, siteId string, body CreatePermissionJSONRequestBody, reqEditors ...RequestEditorFn) (*CreatePermissionResponse, error) // DeletePermission request DeletePermissionWithResponse(ctx context.Context, siteId string, permissionId PermissionID, reqEditors ...RequestEditorFn) (*DeletePermissionResponse, error) // GetPermission request GetPermissionWithResponse(ctx context.Context, siteId string, permissionId PermissionID, reqEditors ...RequestEditorFn) (*GetPermissionResponse, error) // UpdatePermission request with any body UpdatePermissionWithBodyWithResponse(ctx context.Context, siteId string, permissionId PermissionID, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*UpdatePermissionResponse, error) UpdatePermissionWithResponse(ctx context.Context, siteId string, permissionId PermissionID, body UpdatePermissionJSONRequestBody, reqEditors ...RequestEditorFn) (*UpdatePermissionResponse, error) // GetPermissionKeys request GetPermissionKeysWithResponse(ctx context.Context, siteId string, permissionId PermissionID, reqEditors ...RequestEditorFn) (*GetPermissionKeysResponse, error) // CreatePermissionKey request CreatePermissionKeyWithResponse(ctx context.Context, siteId string, permissionId PermissionID, reqEditors ...RequestEditorFn) (*CreatePermissionKeyResponse, error) // DeletePermissionKey request DeletePermissionKeyWithResponse(ctx context.Context, siteId string, permissionId PermissionID, permissionKeyId AccessKeyID, reqEditors ...RequestEditorFn) (*DeletePermissionKeyResponse, error) // GetPermissionKey request GetPermissionKeyWithResponse(ctx context.Context, siteId string, permissionId PermissionID, permissionKeyId AccessKeyID, reqEditors ...RequestEditorFn) (*GetPermissionKeyResponse, error) // GetStatus request GetStatusWithResponse(ctx context.Context, siteId string, reqEditors ...RequestEditorFn) (*GetStatusResponse, error) }
ClientWithResponsesInterface is the interface specification for the client with responses above.
type Cluster ¶
type Cluster struct { // API Servers Zones ApiZone []string `json:"api_zone"` // URL of Control Panel ControlPanelUrl string `json:"control_panel_url"` // Display Name (Depending on Accept-Language) DisplayName string `json:"display_name"` // Display Name (en-us) DisplayNameEnUs string `json:"display_name_en_us"` // Display Name (ja) DisplayNameJa string `json:"display_name_ja"` // Display Order (Can be ignored) DisplayOrder int `json:"display_order"` // Endpoint Base of Cluster EndpointBase string `json:"endpoint_base"` // URL of IAM-compat API IamEndpoint string `json:"iam_endpoint"` // URL of IAM-compat API (w/ resigning) IamEndpointForControlPanel string `json:"iam_endpoint_for_control_panel"` Id string `json:"id"` // URL of S3-compat API S3Endpoint string `json:"s3_endpoint"` // URL of S3-compat API (w/ resigning) S3EndpointForControlPanel string `json:"s3_endpoint_for_control_panel"` // Storage Servers Zones StorageZone []string `json:"storage_zone"` }
Cluster defines model for Cluster.
type CreateAccountKeyResponse ¶ added in v0.0.2
type CreateAccountKeyResponse struct { Body []byte HTTPResponse *http.Response JSON201 *AccountKeyResponseBody JSON401 *Error401 JSON404 *Error404 JSON409 *Error409 JSONDefault *ErrorDefault }
func ParseCreateAccountKeyResponse ¶ added in v0.0.2
func ParseCreateAccountKeyResponse(rsp *http.Response) (*CreateAccountKeyResponse, error)
ParseCreateAccountKeyResponse parses an HTTP response from a CreateAccountKeyWithResponse call
func (CreateAccountKeyResponse) Result ¶ added in v0.0.2
func (r CreateAccountKeyResponse) Result() (*AccountKeyResponseBody, error)
Result JSON200の結果、もしくは発生したエラーのいずれかを返す
func (CreateAccountKeyResponse) Status ¶ added in v0.0.2
func (r CreateAccountKeyResponse) Status() string
Status returns HTTPResponse.Status
func (CreateAccountKeyResponse) StatusCode ¶ added in v0.0.2
func (r CreateAccountKeyResponse) StatusCode() int
StatusCode returns HTTPResponse.StatusCode
func (CreateAccountKeyResponse) UndefinedError ¶ added in v0.0.2
func (r CreateAccountKeyResponse) UndefinedError() error
UndefinedError API定義で未定義なエラーステータスコードを受け取った場合にエラーを返す
type CreateAccountResponse ¶ added in v0.0.2
type CreateAccountResponse struct { Body []byte HTTPResponse *http.Response JSON201 *AccountResponseBody JSON401 *Error401 JSON403 *Error403 JSON409 *Error409 JSONDefault *ErrorDefault }
func ParseCreateAccountResponse ¶ added in v0.0.2
func ParseCreateAccountResponse(rsp *http.Response) (*CreateAccountResponse, error)
ParseCreateAccountResponse parses an HTTP response from a CreateAccountWithResponse call
func (CreateAccountResponse) Result ¶ added in v0.0.2
func (r CreateAccountResponse) Result() (*AccountResponseBody, error)
Result JSON200の結果、もしくは発生したエラーのいずれかを返す
func (CreateAccountResponse) Status ¶ added in v0.0.2
func (r CreateAccountResponse) Status() string
Status returns HTTPResponse.Status
func (CreateAccountResponse) StatusCode ¶ added in v0.0.2
func (r CreateAccountResponse) StatusCode() int
StatusCode returns HTTPResponse.StatusCode
func (CreateAccountResponse) UndefinedError ¶ added in v0.0.2
func (r CreateAccountResponse) UndefinedError() error
UndefinedError API定義で未定義なエラーステータスコードを受け取った場合にエラーを返す
type CreateBucketJSONBody ¶
type CreateBucketJSONBody CreateBucketRequestBody
CreateBucketJSONBody defines parameters for CreateBucket.
type CreateBucketJSONRequestBody ¶
type CreateBucketJSONRequestBody CreateBucketJSONBody
CreateBucketJSONRequestBody defines body for CreateBucket for application/json ContentType.
type CreateBucketRequestBody ¶
type CreateBucketRequestBody struct {
ClusterId string `json:"cluster_id"`
}
CreateBucketRequestBody defines model for CreateBucketRequestBody.
type CreateBucketResponse ¶
type CreateBucketResponse struct { Body []byte HTTPResponse *http.Response JSON201 *CreateBucketResponseBody JSON400 *Error400 JSON404 *Error404 JSON409 *Error409 }
func ParseCreateBucketResponse ¶
func ParseCreateBucketResponse(rsp *http.Response) (*CreateBucketResponse, error)
ParseCreateBucketResponse parses an HTTP response from a CreateBucketWithResponse call
func (CreateBucketResponse) Result ¶
func (r CreateBucketResponse) Result() (*CreateBucketResponseBody, error)
Result JSON200の結果、もしくは発生したエラーのいずれかを返す
func (CreateBucketResponse) Status ¶
func (r CreateBucketResponse) Status() string
Status returns HTTPResponse.Status
func (CreateBucketResponse) StatusCode ¶
func (r CreateBucketResponse) StatusCode() int
StatusCode returns HTTPResponse.StatusCode
func (CreateBucketResponse) UndefinedError ¶
func (r CreateBucketResponse) UndefinedError() error
UndefinedError API定義で未定義なエラーステータスコードを受け取った場合にエラーを返す
type CreateBucketResponseBody ¶
type CreateBucketResponseBody struct {
Data Bucket `json:"data"`
}
CreateBucketResponseBody defines model for CreateBucketResponseBody.
type CreatePermissionJSONBody ¶
type CreatePermissionJSONBody PermissionRequestBody
CreatePermissionJSONBody defines parameters for CreatePermission.
type CreatePermissionJSONRequestBody ¶
type CreatePermissionJSONRequestBody CreatePermissionJSONBody
CreatePermissionJSONRequestBody defines body for CreatePermission for application/json ContentType.
type CreatePermissionKeyResponse ¶ added in v0.0.2
type CreatePermissionKeyResponse struct { Body []byte HTTPResponse *http.Response JSON201 *PermissionKeyResponseBody JSON401 *Error401 JSON404 *Error404 JSON409 *Error409 JSONDefault *ErrorDefault }
func ParseCreatePermissionKeyResponse ¶ added in v0.0.2
func ParseCreatePermissionKeyResponse(rsp *http.Response) (*CreatePermissionKeyResponse, error)
ParseCreatePermissionKeyResponse parses an HTTP response from a CreatePermissionKeyWithResponse call
func (CreatePermissionKeyResponse) Result ¶ added in v0.0.2
func (r CreatePermissionKeyResponse) Result() (*PermissionKeyResponseBody, error)
Result JSON200の結果、もしくは発生したエラーのいずれかを返す
func (CreatePermissionKeyResponse) Status ¶ added in v0.0.2
func (r CreatePermissionKeyResponse) Status() string
Status returns HTTPResponse.Status
func (CreatePermissionKeyResponse) StatusCode ¶ added in v0.0.2
func (r CreatePermissionKeyResponse) StatusCode() int
StatusCode returns HTTPResponse.StatusCode
func (CreatePermissionKeyResponse) UndefinedError ¶ added in v0.0.2
func (r CreatePermissionKeyResponse) UndefinedError() error
UndefinedError API定義で未定義なエラーステータスコードを受け取った場合にエラーを返す
type CreatePermissionParams ¶
type CreatePermissionParams = CreatePermissionJSONRequestBody
CreatePermissionParams CreatePermissionJSONRequestBodyのエイリアス
type CreatePermissionResponse ¶
type CreatePermissionResponse struct { Body []byte HTTPResponse *http.Response JSON201 *PermissionResponseBody JSON401 *Error401 JSON404 *Error404 JSON409 *Error409 JSONDefault *ErrorDefault }
func ParseCreatePermissionResponse ¶
func ParseCreatePermissionResponse(rsp *http.Response) (*CreatePermissionResponse, error)
ParseCreatePermissionResponse parses an HTTP response from a CreatePermissionWithResponse call
func (CreatePermissionResponse) Result ¶
func (r CreatePermissionResponse) Result() (*PermissionResponseBody, error)
Result JSON200の結果、もしくは発生したエラーのいずれかを返す
func (CreatePermissionResponse) Status ¶
func (r CreatePermissionResponse) Status() string
Status returns HTTPResponse.Status
func (CreatePermissionResponse) StatusCode ¶
func (r CreatePermissionResponse) StatusCode() int
StatusCode returns HTTPResponse.StatusCode
func (CreatePermissionResponse) UndefinedError ¶
func (r CreatePermissionResponse) UndefinedError() error
UndefinedError API定義で未定義なエラーステータスコードを受け取った場合にエラーを返す
type CreatedAt ¶
Created at
func (*CreatedAt) MarshalJSON ¶
MarshalJSON time.Time型からのUnmarshalの実装
func (*CreatedAt) UnmarshalJSON ¶
UnmarshalJSON time.Time型へのUnmarshalの実装
type DeleteAccountKeyResponse ¶ added in v0.0.2
func ParseDeleteAccountKeyResponse ¶ added in v0.0.2
func ParseDeleteAccountKeyResponse(rsp *http.Response) (*DeleteAccountKeyResponse, error)
ParseDeleteAccountKeyResponse parses an HTTP response from a DeleteAccountKeyWithResponse call
func (DeleteAccountKeyResponse) Result ¶ added in v0.0.2
func (r DeleteAccountKeyResponse) Result() error
Result JSON200の結果、もしくは発生したエラーのいずれかを返す
func (DeleteAccountKeyResponse) Status ¶ added in v0.0.2
func (r DeleteAccountKeyResponse) Status() string
Status returns HTTPResponse.Status
func (DeleteAccountKeyResponse) StatusCode ¶ added in v0.0.2
func (r DeleteAccountKeyResponse) StatusCode() int
StatusCode returns HTTPResponse.StatusCode
func (DeleteAccountKeyResponse) UndefinedError ¶ added in v0.0.2
func (r DeleteAccountKeyResponse) UndefinedError() error
UndefinedError API定義で未定義なエラーステータスコードを受け取った場合にエラーを返す
type DeleteAccountResponse ¶ added in v0.0.2
type DeleteAccountResponse struct { Body []byte HTTPResponse *http.Response JSON401 *Error401 JSON409 *Error409 }
func ParseDeleteAccountResponse ¶ added in v0.0.2
func ParseDeleteAccountResponse(rsp *http.Response) (*DeleteAccountResponse, error)
ParseDeleteAccountResponse parses an HTTP response from a DeleteAccountWithResponse call
func (DeleteAccountResponse) Result ¶ added in v0.0.2
func (r DeleteAccountResponse) Result() error
Result JSON200の結果、もしくは発生したエラーのいずれかを返す
func (DeleteAccountResponse) Status ¶ added in v0.0.2
func (r DeleteAccountResponse) Status() string
Status returns HTTPResponse.Status
func (DeleteAccountResponse) StatusCode ¶ added in v0.0.2
func (r DeleteAccountResponse) StatusCode() int
StatusCode returns HTTPResponse.StatusCode
func (DeleteAccountResponse) UndefinedError ¶ added in v0.0.2
func (r DeleteAccountResponse) UndefinedError() error
UndefinedError API定義で未定義なエラーステータスコードを受け取った場合にエラーを返す
type DeleteBucketJSONBody ¶
type DeleteBucketJSONBody CreateBucketRequestBody
DeleteBucketJSONBody defines parameters for DeleteBucket.
type DeleteBucketJSONRequestBody ¶
type DeleteBucketJSONRequestBody DeleteBucketJSONBody
DeleteBucketJSONRequestBody defines body for DeleteBucket for application/json ContentType.
type DeleteBucketResponse ¶
type DeleteBucketResponse struct { Body []byte HTTPResponse *http.Response JSON400 *Error400 JSON409 *Error409 }
func ParseDeleteBucketResponse ¶
func ParseDeleteBucketResponse(rsp *http.Response) (*DeleteBucketResponse, error)
ParseDeleteBucketResponse parses an HTTP response from a DeleteBucketWithResponse call
func (DeleteBucketResponse) Result ¶
func (r DeleteBucketResponse) Result() error
Result JSON200の結果、もしくは発生したエラーのいずれかを返す
func (DeleteBucketResponse) Status ¶
func (r DeleteBucketResponse) Status() string
Status returns HTTPResponse.Status
func (DeleteBucketResponse) StatusCode ¶
func (r DeleteBucketResponse) StatusCode() int
StatusCode returns HTTPResponse.StatusCode
func (DeleteBucketResponse) UndefinedError ¶
func (r DeleteBucketResponse) UndefinedError() error
UndefinedError API定義で未定義なエラーステータスコードを受け取った場合にエラーを返す
type DeletePermissionKeyResponse ¶ added in v0.0.2
type DeletePermissionKeyResponse struct { Body []byte HTTPResponse *http.Response JSON401 *Error401 JSON404 *Error404 }
func ParseDeletePermissionKeyResponse ¶ added in v0.0.2
func ParseDeletePermissionKeyResponse(rsp *http.Response) (*DeletePermissionKeyResponse, error)
ParseDeletePermissionKeyResponse parses an HTTP response from a DeletePermissionKeyWithResponse call
func (DeletePermissionKeyResponse) Result ¶ added in v0.0.2
func (r DeletePermissionKeyResponse) Result() error
Result JSON200の結果、もしくは発生したエラーのいずれかを返す
func (DeletePermissionKeyResponse) Status ¶ added in v0.0.2
func (r DeletePermissionKeyResponse) Status() string
Status returns HTTPResponse.Status
func (DeletePermissionKeyResponse) StatusCode ¶ added in v0.0.2
func (r DeletePermissionKeyResponse) StatusCode() int
StatusCode returns HTTPResponse.StatusCode
func (DeletePermissionKeyResponse) UndefinedError ¶ added in v0.0.2
func (r DeletePermissionKeyResponse) UndefinedError() error
UndefinedError API定義で未定義なエラーステータスコードを受け取った場合にエラーを返す
type DeletePermissionResponse ¶
func ParseDeletePermissionResponse ¶
func ParseDeletePermissionResponse(rsp *http.Response) (*DeletePermissionResponse, error)
ParseDeletePermissionResponse parses an HTTP response from a DeletePermissionWithResponse call
func (DeletePermissionResponse) Result ¶
func (r DeletePermissionResponse) Result() error
Result JSON200の結果、もしくは発生したエラーのいずれかを返す
func (DeletePermissionResponse) Status ¶
func (r DeletePermissionResponse) Status() string
Status returns HTTPResponse.Status
func (DeletePermissionResponse) StatusCode ¶
func (r DeletePermissionResponse) StatusCode() int
StatusCode returns HTTPResponse.StatusCode
func (DeletePermissionResponse) UndefinedError ¶
func (r DeletePermissionResponse) UndefinedError() error
UndefinedError API定義で未定義なエラーステータスコードを受け取った場合にエラーを返す
type Error ¶
type Error struct { // どのサービスで発生したエラーかを判別する。 // マイクロサービス名に加えてクラスター名を含む文字列が入ることを想定している。 Domain ErrorsDomain `json:"domain"` // エラー発生箇所。 // どのリソースなのか(どのリソースを操作した時に発生したものなのか)、 // どのパラメータなのかといった情報。 Location ErrorsLocation `json:"location"` // エラーの発生箇所の種類。 // HTTPヘッダなのかHTTPパラメータなのか、 // S3バケットなのかといったlocationの種別情報。 LocationType ErrorsLocationType `json:"location_type"` // エラー発生時のメッセージ内容。 // このメッセージはエラーを発生させたアプリケーションのメッセージをそのまま含む場合がある。 Message ErrorsMessage `json:"message"` // なぜそのエラーが発生したかがわかる情報。 // エラーメッセージの原因やエラー解決のためのヒントも含む場合がある。 Reason ErrorsReason `json:"reason"` }
Error defines model for Error.
type Error400 ¶
type Error400 struct { // error Detail ErrorDetail `json:"error"` }
Error400 defines model for Error400.
type Error401 ¶
type Error401 struct { // error Detail ErrorDetail `json:"error"` }
Error401 defines model for Error401.
type Error403 ¶
type Error403 struct { // error Detail ErrorDetail `json:"error"` }
Error403 defines model for Error403.
type Error404 ¶
type Error404 struct { // error Detail ErrorDetail `json:"error"` }
Error404 defines model for Error404.
type Error409 ¶
type Error409 struct { // error Detail ErrorDetail `json:"error"` }
Error409 defines model for Error409.
type ErrorDefault ¶
type ErrorDefault struct { // error Detail ErrorDetail `json:"error"` }
ErrorDefault defines model for ErrorDefault.
func (ErrorDefault) Error ¶
func (e ErrorDefault) Error() string
ActualError ErrorNNNが示すerrorを組み立てて返す
type ErrorDetail ¶
type ErrorDetail struct { // エラーコード。 Code ErrorCode `json:"code"` // 認証に関するエラーについて詳細なエラー内容を表示する。 Errors Errors `json:"errors"` // エラー発生時のメッセージ内容。 // このメッセージはエラーを発生させたアプリケーションのメッセージをそのまま含む場合がある。 Message ErrorMessage `json:"message"` // X-Sakura-Internal-Serial-ID TraceId ErrorTraceId `json:"trace_id"` }
error
type ErrorMessage ¶
type ErrorMessage string
エラー発生時のメッセージ内容。 このメッセージはエラーを発生させたアプリケーションのメッセージをそのまま含む場合がある。
type ErrorsDomain ¶
type ErrorsDomain string
どのサービスで発生したエラーかを判別する。 マイクロサービス名に加えてクラスター名を含む文字列が入ることを想定している。
type ErrorsLocation ¶
type ErrorsLocation string
エラー発生箇所。 どのリソースなのか(どのリソースを操作した時に発生したものなのか)、 どのパラメータなのかといった情報。
type ErrorsLocationType ¶
type ErrorsLocationType string
エラーの発生箇所の種類。 HTTPヘッダなのかHTTPパラメータなのか、 S3バケットなのかといったlocationの種別情報。
type ErrorsMessage ¶
type ErrorsMessage string
エラー発生時のメッセージ内容。 このメッセージはエラーを発生させたアプリケーションのメッセージをそのまま含む場合がある。
type GetAccountKeyResponse ¶ added in v0.0.2
type GetAccountKeyResponse struct { Body []byte HTTPResponse *http.Response JSON200 *AccountKeyResponseBody JSON401 *Error401 JSON404 *Error404 JSONDefault *ErrorDefault }
func ParseGetAccountKeyResponse ¶ added in v0.0.2
func ParseGetAccountKeyResponse(rsp *http.Response) (*GetAccountKeyResponse, error)
ParseGetAccountKeyResponse parses an HTTP response from a GetAccountKeyWithResponse call
func (GetAccountKeyResponse) Result ¶ added in v0.0.2
func (r GetAccountKeyResponse) Result() (*AccountKeyResponseBody, error)
Result JSON200の結果、もしくは発生したエラーのいずれかを返す
func (GetAccountKeyResponse) Status ¶ added in v0.0.2
func (r GetAccountKeyResponse) Status() string
Status returns HTTPResponse.Status
func (GetAccountKeyResponse) StatusCode ¶ added in v0.0.2
func (r GetAccountKeyResponse) StatusCode() int
StatusCode returns HTTPResponse.StatusCode
func (GetAccountKeyResponse) UndefinedError ¶ added in v0.0.2
func (r GetAccountKeyResponse) UndefinedError() error
UndefinedError API定義で未定義なエラーステータスコードを受け取った場合にエラーを返す
type GetAccountKeysResponse ¶ added in v0.0.2
type GetAccountKeysResponse struct { Body []byte HTTPResponse *http.Response JSON200 *AccountKeysResponseBody JSON401 *Error401 JSON404 *Error404 JSONDefault *ErrorDefault }
func ParseGetAccountKeysResponse ¶ added in v0.0.2
func ParseGetAccountKeysResponse(rsp *http.Response) (*GetAccountKeysResponse, error)
ParseGetAccountKeysResponse parses an HTTP response from a GetAccountKeysWithResponse call
func (GetAccountKeysResponse) Result ¶ added in v0.0.2
func (r GetAccountKeysResponse) Result() (*AccountKeysResponseBody, error)
Result JSON200の結果、もしくは発生したエラーのいずれかを返す
func (GetAccountKeysResponse) Status ¶ added in v0.0.2
func (r GetAccountKeysResponse) Status() string
Status returns HTTPResponse.Status
func (GetAccountKeysResponse) StatusCode ¶ added in v0.0.2
func (r GetAccountKeysResponse) StatusCode() int
StatusCode returns HTTPResponse.StatusCode
func (GetAccountKeysResponse) UndefinedError ¶ added in v0.0.2
func (r GetAccountKeysResponse) UndefinedError() error
UndefinedError API定義で未定義なエラーステータスコードを受け取った場合にエラーを返す
type GetAccountResponse ¶ added in v0.0.2
type GetAccountResponse struct { Body []byte HTTPResponse *http.Response JSON200 *AccountResponseBody JSON401 *Error401 JSON404 *Error404 JSONDefault *ErrorDefault }
func ParseGetAccountResponse ¶ added in v0.0.2
func ParseGetAccountResponse(rsp *http.Response) (*GetAccountResponse, error)
ParseGetAccountResponse parses an HTTP response from a GetAccountWithResponse call
func (GetAccountResponse) Result ¶ added in v0.0.2
func (r GetAccountResponse) Result() (*AccountResponseBody, error)
Result JSON200の結果、もしくは発生したエラーのいずれかを返す
func (GetAccountResponse) Status ¶ added in v0.0.2
func (r GetAccountResponse) Status() string
Status returns HTTPResponse.Status
func (GetAccountResponse) StatusCode ¶ added in v0.0.2
func (r GetAccountResponse) StatusCode() int
StatusCode returns HTTPResponse.StatusCode
func (GetAccountResponse) UndefinedError ¶ added in v0.0.2
func (r GetAccountResponse) UndefinedError() error
UndefinedError API定義で未定義なエラーステータスコードを受け取った場合にエラーを返す
type GetClusterResponse ¶ added in v0.0.2
type GetClusterResponse struct { Body []byte HTTPResponse *http.Response JSON200 *ReadClusterResponseBody JSON401 *Error401 JSON404 *Error404 }
func ParseGetClusterResponse ¶ added in v0.0.2
func ParseGetClusterResponse(rsp *http.Response) (*GetClusterResponse, error)
ParseGetClusterResponse parses an HTTP response from a GetClusterWithResponse call
func (GetClusterResponse) Result ¶ added in v0.0.2
func (r GetClusterResponse) Result() (*ReadClusterResponseBody, error)
Result JSON200の結果、もしくは発生したエラーのいずれかを返す
func (GetClusterResponse) Status ¶ added in v0.0.2
func (r GetClusterResponse) Status() string
Status returns HTTPResponse.Status
func (GetClusterResponse) StatusCode ¶ added in v0.0.2
func (r GetClusterResponse) StatusCode() int
StatusCode returns HTTPResponse.StatusCode
func (GetClusterResponse) UndefinedError ¶ added in v0.0.2
func (r GetClusterResponse) UndefinedError() error
UndefinedError API定義で未定義なエラーステータスコードを受け取った場合にエラーを返す
type GetClustersResponse ¶ added in v0.0.2
type GetClustersResponse struct { Body []byte HTTPResponse *http.Response JSON200 *ListClustersResponseBody JSON401 *Error401 }
func ParseGetClustersResponse ¶ added in v0.0.2
func ParseGetClustersResponse(rsp *http.Response) (*GetClustersResponse, error)
ParseGetClustersResponse parses an HTTP response from a GetClustersWithResponse call
func (GetClustersResponse) Result ¶ added in v0.0.2
func (r GetClustersResponse) Result() (*ListClustersResponseBody, error)
Result JSON200の結果、もしくは発生したエラーのいずれかを返す
func (GetClustersResponse) Status ¶ added in v0.0.2
func (r GetClustersResponse) Status() string
Status returns HTTPResponse.Status
func (GetClustersResponse) StatusCode ¶ added in v0.0.2
func (r GetClustersResponse) StatusCode() int
StatusCode returns HTTPResponse.StatusCode
func (GetClustersResponse) UndefinedError ¶ added in v0.0.2
func (r GetClustersResponse) UndefinedError() error
UndefinedError API定義で未定義なエラーステータスコードを受け取った場合にエラーを返す
type GetPermissionKeyResponse ¶ added in v0.0.2
type GetPermissionKeyResponse struct { Body []byte HTTPResponse *http.Response JSON200 *PermissionKeyResponseBody JSON401 *Error401 JSON404 *Error404 JSONDefault *ErrorDefault }
func ParseGetPermissionKeyResponse ¶ added in v0.0.2
func ParseGetPermissionKeyResponse(rsp *http.Response) (*GetPermissionKeyResponse, error)
ParseGetPermissionKeyResponse parses an HTTP response from a GetPermissionKeyWithResponse call
func (GetPermissionKeyResponse) Result ¶ added in v0.0.2
func (r GetPermissionKeyResponse) Result() (*PermissionKeyResponseBody, error)
Result JSON200の結果、もしくは発生したエラーのいずれかを返す
func (GetPermissionKeyResponse) Status ¶ added in v0.0.2
func (r GetPermissionKeyResponse) Status() string
Status returns HTTPResponse.Status
func (GetPermissionKeyResponse) StatusCode ¶ added in v0.0.2
func (r GetPermissionKeyResponse) StatusCode() int
StatusCode returns HTTPResponse.StatusCode
func (GetPermissionKeyResponse) UndefinedError ¶ added in v0.0.2
func (r GetPermissionKeyResponse) UndefinedError() error
UndefinedError API定義で未定義なエラーステータスコードを受け取った場合にエラーを返す
type GetPermissionKeysResponse ¶ added in v0.0.2
type GetPermissionKeysResponse struct { Body []byte HTTPResponse *http.Response JSON200 *PermissionKeysResponseBody JSON401 *Error401 JSON404 *Error404 JSONDefault *ErrorDefault }
func ParseGetPermissionKeysResponse ¶ added in v0.0.2
func ParseGetPermissionKeysResponse(rsp *http.Response) (*GetPermissionKeysResponse, error)
ParseGetPermissionKeysResponse parses an HTTP response from a GetPermissionKeysWithResponse call
func (GetPermissionKeysResponse) Result ¶ added in v0.0.2
func (r GetPermissionKeysResponse) Result() (*PermissionKeysResponseBody, error)
Result JSON200の結果、もしくは発生したエラーのいずれかを返す
func (GetPermissionKeysResponse) Status ¶ added in v0.0.2
func (r GetPermissionKeysResponse) Status() string
Status returns HTTPResponse.Status
func (GetPermissionKeysResponse) StatusCode ¶ added in v0.0.2
func (r GetPermissionKeysResponse) StatusCode() int
StatusCode returns HTTPResponse.StatusCode
func (GetPermissionKeysResponse) UndefinedError ¶ added in v0.0.2
func (r GetPermissionKeysResponse) UndefinedError() error
UndefinedError API定義で未定義なエラーステータスコードを受け取った場合にエラーを返す
type GetPermissionResponse ¶ added in v0.0.2
type GetPermissionResponse struct { Body []byte HTTPResponse *http.Response JSON200 *PermissionResponseBody JSON401 *Error401 JSON404 *Error404 JSONDefault *ErrorDefault }
func ParseGetPermissionResponse ¶ added in v0.0.2
func ParseGetPermissionResponse(rsp *http.Response) (*GetPermissionResponse, error)
ParseGetPermissionResponse parses an HTTP response from a GetPermissionWithResponse call
func (GetPermissionResponse) Result ¶ added in v0.0.2
func (r GetPermissionResponse) Result() (*PermissionResponseBody, error)
Result JSON200の結果、もしくは発生したエラーのいずれかを返す
func (GetPermissionResponse) Status ¶ added in v0.0.2
func (r GetPermissionResponse) Status() string
Status returns HTTPResponse.Status
func (GetPermissionResponse) StatusCode ¶ added in v0.0.2
func (r GetPermissionResponse) StatusCode() int
StatusCode returns HTTPResponse.StatusCode
func (GetPermissionResponse) UndefinedError ¶ added in v0.0.2
func (r GetPermissionResponse) UndefinedError() error
UndefinedError API定義で未定義なエラーステータスコードを受け取った場合にエラーを返す
type GetPermissionsResponse ¶ added in v0.0.2
type GetPermissionsResponse struct { Body []byte HTTPResponse *http.Response JSON200 *PermissionsResponseBody JSON401 *Error401 JSONDefault *ErrorDefault }
func ParseGetPermissionsResponse ¶ added in v0.0.2
func ParseGetPermissionsResponse(rsp *http.Response) (*GetPermissionsResponse, error)
ParseGetPermissionsResponse parses an HTTP response from a GetPermissionsWithResponse call
func (GetPermissionsResponse) Result ¶ added in v0.0.2
func (r GetPermissionsResponse) Result() (*PermissionsResponseBody, error)
Result JSON200の結果、もしくは発生したエラーのいずれかを返す
func (GetPermissionsResponse) Status ¶ added in v0.0.2
func (r GetPermissionsResponse) Status() string
Status returns HTTPResponse.Status
func (GetPermissionsResponse) StatusCode ¶ added in v0.0.2
func (r GetPermissionsResponse) StatusCode() int
StatusCode returns HTTPResponse.StatusCode
func (GetPermissionsResponse) UndefinedError ¶ added in v0.0.2
func (r GetPermissionsResponse) UndefinedError() error
UndefinedError API定義で未定義なエラーステータスコードを受け取った場合にエラーを返す
type GetStatusResponse ¶ added in v0.0.2
type GetStatusResponse struct { Body []byte HTTPResponse *http.Response JSON200 *StatusResponseBody JSON401 *Error401 JSON404 *Error404 JSONDefault *ErrorDefault }
func ParseGetStatusResponse ¶ added in v0.0.2
func ParseGetStatusResponse(rsp *http.Response) (*GetStatusResponse, error)
ParseGetStatusResponse parses an HTTP response from a GetStatusWithResponse call
func (GetStatusResponse) Result ¶ added in v0.0.2
func (r GetStatusResponse) Result() (*StatusResponseBody, error)
Result JSON200の結果、もしくは発生したエラーのいずれかを返す
func (GetStatusResponse) Status ¶ added in v0.0.2
func (r GetStatusResponse) Status() string
Status returns HTTPResponse.Status
func (GetStatusResponse) StatusCode ¶ added in v0.0.2
func (r GetStatusResponse) StatusCode() int
StatusCode returns HTTPResponse.StatusCode
func (GetStatusResponse) UndefinedError ¶ added in v0.0.2
func (r GetStatusResponse) UndefinedError() error
UndefinedError API定義で未定義なエラーステータスコードを受け取った場合にエラーを返す
type GinServerOptions ¶
type GinServerOptions struct { BaseURL string Middlewares []MiddlewareFunc }
GinServerOptions provides options for the Gin server.
type HttpRequestDoer ¶
Doer performs HTTP requests.
The standard http.Client implements this interface.
type ListClustersResponseBody ¶
type ListClustersResponseBody struct { // If use a pointer type, braek output Data []Cluster `json:"data"` }
ListClustersResponseBody defines model for ListClustersResponseBody.
type MiddlewareFunc ¶
type Permission ¶
type Permission struct { // Bucket controls BucketControls BucketControls `json:"bucket_controls"` // Created at CreatedAt CreatedAt `json:"created_at"` // Display name DisplayName DisplayName `json:"display_name"` // Permission ID Id PermissionID `json:"id"` }
Permission defines model for Permission.
type PermissionKey ¶
type PermissionKey struct { // Created at CreatedAt CreatedAt `json:"created_at"` // Access key ID Id AccessKeyID `json:"id"` // Permission secret key Secret PermissionSecret `json:"secret"` }
Permission Key
type PermissionKeyResponseBody ¶
type PermissionKeyResponseBody struct { // Permission Key Data PermissionKey `json:"data"` }
data type
type PermissionKeysResponseBody ¶
type PermissionKeysResponseBody struct { // Permission Keys Data PermissionKeys `json:"data"` }
data type
type PermissionRequestBody ¶
type PermissionRequestBody struct { // Bucket controls BucketControls BucketControls `json:"bucket_controls"` // Display name DisplayName DisplayName `json:"display_name"` }
Request body for bucket controls for Permission
type PermissionResponseBody ¶
type PermissionResponseBody struct {
Data Permission `json:"data"`
}
PermissionResponseBody defines model for PermissionResponseBody.
type PermissionsResponseBody ¶
type PermissionsResponseBody struct { // Permissions Data Permissions `json:"data"` }
PermissionsResponseBody defines model for PermissionsResponseBody.
type ReadClusterResponseBody ¶
type ReadClusterResponseBody struct {
Data *Cluster `json:"data,omitempty"`
}
ReadClusterResponseBody defines model for ReadClusterResponseBody.
type RequestEditorFn ¶
RequestEditorFn is the function signature for the RequestEditor callback function
type ServerInterface ¶
type ServerInterface interface { // バケットの削除 // (DELETE /fed/v1/buckets/{bucket_name}) DeleteBucket(c *gin.Context, bucketName BucketName) // バケットの作成 // (PUT /fed/v1/buckets/{bucket_name}) CreateBucket(c *gin.Context, bucketName BucketName) // サイト一覧の取得 // (GET /fed/v1/clusters) GetClusters(c *gin.Context) // サイトの取得 // (GET /fed/v1/clusters/{site_id}) GetCluster(c *gin.Context, siteId string) // サイトアカウントの削除 // (DELETE /{site_id}/v2/account) DeleteAccount(c *gin.Context, siteId string) // サイトアカウントの取得 // (GET /{site_id}/v2/account) GetAccount(c *gin.Context, siteId string) // サイトアカウントの作成 // (POST /{site_id}/v2/account) CreateAccount(c *gin.Context, siteId string) // サイトアカウントのアクセスキーの取得 // (GET /{site_id}/v2/account/keys) GetAccountKeys(c *gin.Context, siteId string) // サイトアカウントのアクセスキーの発行 // (POST /{site_id}/v2/account/keys) CreateAccountKey(c *gin.Context, siteId string) // サイトアカウントのアクセスキーの削除 // (DELETE /{site_id}/v2/account/keys/{account_key_id}) DeleteAccountKey(c *gin.Context, siteId string, accountKeyId AccessKeyID) // サイトアカウントのアクセスキーの取得 // (GET /{site_id}/v2/account/keys/{account_key_id}) GetAccountKey(c *gin.Context, siteId string, accountKeyId AccessKeyID) // パーミッション一覧の取得 // (GET /{site_id}/v2/permissions) GetPermissions(c *gin.Context, siteId string) // パーミッションの作成 // (POST /{site_id}/v2/permissions) CreatePermission(c *gin.Context, siteId string) // パーミッションの削除 // (DELETE /{site_id}/v2/permissions/{permission_id}) DeletePermission(c *gin.Context, siteId string, permissionId PermissionID) // パーミッションの取得 // (GET /{site_id}/v2/permissions/{permission_id}) GetPermission(c *gin.Context, siteId string, permissionId PermissionID) // パーミッションの更新 // (PUT /{site_id}/v2/permissions/{permission_id}) UpdatePermission(c *gin.Context, siteId string, permissionId PermissionID) // パーミッションが保有するアクセスキー一覧の取得 // (GET /{site_id}/v2/permissions/{permission_id}/keys) GetPermissionKeys(c *gin.Context, siteId string, permissionId PermissionID) // パーミッションのアクセスキーの発行 // (POST /{site_id}/v2/permissions/{permission_id}/keys) CreatePermissionKey(c *gin.Context, siteId string, permissionId PermissionID) // パーミッションが保有するアクセスキーの削除 // (DELETE /{site_id}/v2/permissions/{permission_id}/keys/{permission_key_id}) DeletePermissionKey(c *gin.Context, siteId string, permissionId PermissionID, permissionKeyId AccessKeyID) // パーミッションが保有するアクセスキーの取得 // (GET /{site_id}/v2/permissions/{permission_id}/keys/{permission_key_id}) GetPermissionKey(c *gin.Context, siteId string, permissionId PermissionID, permissionKeyId AccessKeyID) // サイトのステータスの取得 // (GET /{site_id}/v2/status) GetStatus(c *gin.Context, siteId string) }
ServerInterface represents all server handlers.
type ServerInterfaceWrapper ¶
type ServerInterfaceWrapper struct { Handler ServerInterface HandlerMiddlewares []MiddlewareFunc }
ServerInterfaceWrapper converts contexts to parameters.
func (*ServerInterfaceWrapper) CreateAccount ¶ added in v0.0.2
func (siw *ServerInterfaceWrapper) CreateAccount(c *gin.Context)
CreateAccount operation middleware
func (*ServerInterfaceWrapper) CreateAccountKey ¶ added in v0.0.2
func (siw *ServerInterfaceWrapper) CreateAccountKey(c *gin.Context)
CreateAccountKey operation middleware
func (*ServerInterfaceWrapper) CreateBucket ¶
func (siw *ServerInterfaceWrapper) CreateBucket(c *gin.Context)
CreateBucket operation middleware
func (*ServerInterfaceWrapper) CreatePermission ¶
func (siw *ServerInterfaceWrapper) CreatePermission(c *gin.Context)
CreatePermission operation middleware
func (*ServerInterfaceWrapper) CreatePermissionKey ¶ added in v0.0.2
func (siw *ServerInterfaceWrapper) CreatePermissionKey(c *gin.Context)
CreatePermissionKey operation middleware
func (*ServerInterfaceWrapper) DeleteAccount ¶ added in v0.0.2
func (siw *ServerInterfaceWrapper) DeleteAccount(c *gin.Context)
DeleteAccount operation middleware
func (*ServerInterfaceWrapper) DeleteAccountKey ¶ added in v0.0.2
func (siw *ServerInterfaceWrapper) DeleteAccountKey(c *gin.Context)
DeleteAccountKey operation middleware
func (*ServerInterfaceWrapper) DeleteBucket ¶
func (siw *ServerInterfaceWrapper) DeleteBucket(c *gin.Context)
DeleteBucket operation middleware
func (*ServerInterfaceWrapper) DeletePermission ¶
func (siw *ServerInterfaceWrapper) DeletePermission(c *gin.Context)
DeletePermission operation middleware
func (*ServerInterfaceWrapper) DeletePermissionKey ¶ added in v0.0.2
func (siw *ServerInterfaceWrapper) DeletePermissionKey(c *gin.Context)
DeletePermissionKey operation middleware
func (*ServerInterfaceWrapper) GetAccount ¶ added in v0.0.2
func (siw *ServerInterfaceWrapper) GetAccount(c *gin.Context)
GetAccount operation middleware
func (*ServerInterfaceWrapper) GetAccountKey ¶ added in v0.0.2
func (siw *ServerInterfaceWrapper) GetAccountKey(c *gin.Context)
GetAccountKey operation middleware
func (*ServerInterfaceWrapper) GetAccountKeys ¶ added in v0.0.2
func (siw *ServerInterfaceWrapper) GetAccountKeys(c *gin.Context)
GetAccountKeys operation middleware
func (*ServerInterfaceWrapper) GetCluster ¶ added in v0.0.2
func (siw *ServerInterfaceWrapper) GetCluster(c *gin.Context)
GetCluster operation middleware
func (*ServerInterfaceWrapper) GetClusters ¶ added in v0.0.2
func (siw *ServerInterfaceWrapper) GetClusters(c *gin.Context)
GetClusters operation middleware
func (*ServerInterfaceWrapper) GetPermission ¶ added in v0.0.2
func (siw *ServerInterfaceWrapper) GetPermission(c *gin.Context)
GetPermission operation middleware
func (*ServerInterfaceWrapper) GetPermissionKey ¶ added in v0.0.2
func (siw *ServerInterfaceWrapper) GetPermissionKey(c *gin.Context)
GetPermissionKey operation middleware
func (*ServerInterfaceWrapper) GetPermissionKeys ¶ added in v0.0.2
func (siw *ServerInterfaceWrapper) GetPermissionKeys(c *gin.Context)
GetPermissionKeys operation middleware
func (*ServerInterfaceWrapper) GetPermissions ¶ added in v0.0.2
func (siw *ServerInterfaceWrapper) GetPermissions(c *gin.Context)
GetPermissions operation middleware
func (*ServerInterfaceWrapper) GetStatus ¶ added in v0.0.2
func (siw *ServerInterfaceWrapper) GetStatus(c *gin.Context)
GetStatus operation middleware
func (*ServerInterfaceWrapper) UpdatePermission ¶
func (siw *ServerInterfaceWrapper) UpdatePermission(c *gin.Context)
UpdatePermission operation middleware
type Status ¶
type Status struct { AcceptNew bool `json:"accept_new"` Message string `json:"message"` StartedAt time.Time `json:"started_at"` StatusCode StatusCode `json:"status_code"` }
data type
type StatusCode ¶
StatusCode defines model for StatusCode.
type StatusResponseBody ¶
type StatusResponseBody struct { // data type Data Status `json:"data"` }
Status
type UpdatePermissionJSONBody ¶
type UpdatePermissionJSONBody PermissionRequestBody
UpdatePermissionJSONBody defines parameters for UpdatePermission.
type UpdatePermissionJSONRequestBody ¶
type UpdatePermissionJSONRequestBody UpdatePermissionJSONBody
UpdatePermissionJSONRequestBody defines body for UpdatePermission for application/json ContentType.
type UpdatePermissionParams ¶
type UpdatePermissionParams = CreatePermissionJSONRequestBody
UpdatePermissionParams CreatePermissionJSONRequestBodyのエイリアス
type UpdatePermissionResponse ¶
type UpdatePermissionResponse struct { Body []byte HTTPResponse *http.Response JSON200 *PermissionResponseBody JSON401 *Error401 JSON404 *Error404 JSON409 *Error409 JSONDefault *ErrorDefault }
func ParseUpdatePermissionResponse ¶
func ParseUpdatePermissionResponse(rsp *http.Response) (*UpdatePermissionResponse, error)
ParseUpdatePermissionResponse parses an HTTP response from a UpdatePermissionWithResponse call
func (UpdatePermissionResponse) Result ¶
func (r UpdatePermissionResponse) Result() (*PermissionResponseBody, error)
Result JSON200の結果、もしくは発生したエラーのいずれかを返す
func (UpdatePermissionResponse) Status ¶
func (r UpdatePermissionResponse) Status() string
Status returns HTTPResponse.Status
func (UpdatePermissionResponse) StatusCode ¶
func (r UpdatePermissionResponse) StatusCode() int
StatusCode returns HTTPResponse.StatusCode
func (UpdatePermissionResponse) UndefinedError ¶
func (r UpdatePermissionResponse) UndefinedError() error
UndefinedError API定義で未定義なエラーステータスコードを受け取った場合にエラーを返す