bucketapi

package
v0.3.4 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Sep 13, 2026 License: MIT Imports: 11 Imported by: 0

Documentation

Overview

Package bucketapi provides primitives to interact with the openapi HTTP API.

Code generated by github.com/oapi-codegen/oapi-codegen/v2 version v2.8.0 DO NOT EDIT.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewAddBucketScopeRequest

func NewAddBucketScopeRequest(server string, bucket string, body AddBucketScopeJSONRequestBody) (*http.Request, error)

NewAddBucketScopeRequest calls the generic AddBucketScope builder with application/json body

func NewAddBucketScopeRequestWithBody

func NewAddBucketScopeRequestWithBody(server string, bucket string, contentType string, body io.Reader) (*http.Request, error)

NewAddBucketScopeRequestWithBody constructs an http.Request for the AddBucketScope method, with any body, and a specified content type

func NewDeleteBucketRequest

func NewDeleteBucketRequest(server string, bucket string) (*http.Request, error)

NewDeleteBucketRequest constructs an http.Request for the DeleteBucket method

func NewDeleteBucketScopeRequest

func NewDeleteBucketScopeRequest(server string, bucket string, params *DeleteBucketScopeParams) (*http.Request, error)

NewDeleteBucketScopeRequest constructs an http.Request for the DeleteBucketScope method

func NewDeleteProjectDataRequest

func NewDeleteProjectDataRequest(server string, organization string, projectId string) (*http.Request, error)

NewDeleteProjectDataRequest constructs an http.Request for the DeleteProjectData method

func NewListBucketScopesRequest

func NewListBucketScopesRequest(server string, bucket string) (*http.Request, error)

NewListBucketScopesRequest constructs an http.Request for the ListBucketScopes method

func NewListBucketsRequest

func NewListBucketsRequest(server string) (*http.Request, error)

NewListBucketsRequest constructs an http.Request for the ListBuckets method

func NewPutBucketRequest

func NewPutBucketRequest(server string, body PutBucketJSONRequestBody) (*http.Request, error)

NewPutBucketRequest calls the generic PutBucket builder with application/json body

func NewPutBucketRequestWithBody

func NewPutBucketRequestWithBody(server string, contentType string, body io.Reader) (*http.Request, error)

NewPutBucketRequestWithBody constructs an http.Request for the PutBucket method, with any body, and a specified content type

func RegisterHandlers

func RegisterHandlers(router fiber.Router, si ServerInterface)

RegisterHandlers creates http.Handler with routing matching OpenAPI spec.

func RegisterHandlersWithOptions

func RegisterHandlersWithOptions(router fiber.Router, si ServerInterface, options FiberServerOptions)

RegisterHandlersWithOptions creates http.Handler with additional options

Types

type APIError

type APIError = externalRef0.APIError

APIError A stable Syfon API error.

type AddBucketScope201Response

type AddBucketScope201Response struct {
}

func (AddBucketScope201Response) VisitAddBucketScopeResponse

func (response AddBucketScope201Response) VisitAddBucketScopeResponse(ctx fiber.Ctx) error

type AddBucketScope400JSONResponse

type AddBucketScope400JSONResponse APIError

func (AddBucketScope400JSONResponse) VisitAddBucketScopeResponse

func (response AddBucketScope400JSONResponse) VisitAddBucketScopeResponse(ctx fiber.Ctx) error

type AddBucketScope401JSONResponse

type AddBucketScope401JSONResponse APIError

func (AddBucketScope401JSONResponse) VisitAddBucketScopeResponse

func (response AddBucketScope401JSONResponse) VisitAddBucketScopeResponse(ctx fiber.Ctx) error

type AddBucketScope403JSONResponse

type AddBucketScope403JSONResponse APIError

func (AddBucketScope403JSONResponse) VisitAddBucketScopeResponse

func (response AddBucketScope403JSONResponse) VisitAddBucketScopeResponse(ctx fiber.Ctx) error

type AddBucketScope404JSONResponse

type AddBucketScope404JSONResponse APIError

func (AddBucketScope404JSONResponse) VisitAddBucketScopeResponse

func (response AddBucketScope404JSONResponse) VisitAddBucketScopeResponse(ctx fiber.Ctx) error

type AddBucketScope409JSONResponse

type AddBucketScope409JSONResponse APIError

func (AddBucketScope409JSONResponse) VisitAddBucketScopeResponse

func (response AddBucketScope409JSONResponse) VisitAddBucketScopeResponse(ctx fiber.Ctx) error

type AddBucketScope500JSONResponse

type AddBucketScope500JSONResponse APIError

func (AddBucketScope500JSONResponse) VisitAddBucketScopeResponse

func (response AddBucketScope500JSONResponse) VisitAddBucketScopeResponse(ctx fiber.Ctx) error

type AddBucketScopeJSONRequestBody

type AddBucketScopeJSONRequestBody = AddBucketScopeRequest

AddBucketScopeJSONRequestBody defines body for AddBucketScope for application/json ContentType.

type AddBucketScopeRequest

type AddBucketScopeRequest struct {
	Organization string `json:"organization"`

	// Path Optional s3://bucket/prefix path override
	Path      *string `json:"path,omitempty"`
	ProjectId string  `json:"project_id"`
}

AddBucketScopeRequest defines model for AddBucketScopeRequest.

type AddBucketScopeRequestObject

type AddBucketScopeRequestObject struct {
	Bucket string `json:"bucket"`
	Body   *AddBucketScopeJSONRequestBody
}

type AddBucketScopeResp

type AddBucketScopeResp struct {
	Body         []byte
	HTTPResponse *http.Response
	JSON400      *APIError
	JSON401      *APIError
	JSON403      *APIError
	JSON404      *APIError
	JSON409      *APIError
	JSON500      *APIError
}

func ParseAddBucketScopeResp

func ParseAddBucketScopeResp(rsp *http.Response) (*AddBucketScopeResp, error)

ParseAddBucketScopeResp parses an HTTP response from a AddBucketScopeWithResponse call

func (AddBucketScopeResp) Status

func (r AddBucketScopeResp) Status() string

Status returns HTTPResponse.Status

func (AddBucketScopeResp) StatusCode

func (r AddBucketScopeResp) StatusCode() int

StatusCode returns HTTPResponse.StatusCode

type AddBucketScopeResponseObject

type AddBucketScopeResponseObject interface {
	VisitAddBucketScopeResponse(ctx fiber.Ctx) error
}

type BucketMetadata

type BucketMetadata struct {
	Bucket      *string   `json:"bucket,omitempty"`
	EndpointUrl *string   `json:"endpoint_url,omitempty"`
	Programs    *[]string `json:"programs,omitempty"`
	Provider    *string   `json:"provider,omitempty"`
	Region      *string   `json:"region,omitempty"`
}

BucketMetadata defines model for BucketMetadata.

type BucketScopeResponse

type BucketScopeResponse struct {
	Organization string `json:"organization"`

	// Path Scope path prefix
	Path      *string `json:"path,omitempty"`
	ProjectId string  `json:"project_id"`
}

BucketScopeResponse defines model for BucketScopeResponse.

type BucketsResponse

type BucketsResponse struct {
	S3BUCKETS map[string]BucketMetadata `json:"S3_BUCKETS"`
}

BucketsResponse defines model for BucketsResponse.

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) AddBucketScope

func (c *Client) AddBucketScope(ctx context.Context, bucket string, body AddBucketScopeJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)

AddBucketScope Add an org/project scope to an existing bucket

Takes a body of the `application/json` content type.

Corresponds with POST /data/buckets/{bucket}/scopes (the `AddBucketScope` operationId).

func (*Client) AddBucketScopeWithBody

func (c *Client) AddBucketScopeWithBody(ctx context.Context, bucket string, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error)

AddBucketScopeWithBody Add an org/project scope to an existing bucket

Takes any type of body and a specified content type.

Corresponds with POST /data/buckets/{bucket}/scopes (the `AddBucketScope` operationId).

func (*Client) DeleteBucket

func (c *Client) DeleteBucket(ctx context.Context, bucket string, reqEditors ...RequestEditorFn) (*http.Response, error)

DeleteBucket Delete bucket credential

Corresponds with DELETE /data/buckets/{bucket} (the `DeleteBucket` operationId).

func (*Client) DeleteBucketScope

func (c *Client) DeleteBucketScope(ctx context.Context, bucket string, params *DeleteBucketScopeParams, reqEditors ...RequestEditorFn) (*http.Response, error)

DeleteBucketScope Remove a specific scope from an existing bucket

Corresponds with DELETE /data/buckets/{bucket}/scopes (the `DeleteBucketScope` operationId).

func (*Client) DeleteProjectData

func (c *Client) DeleteProjectData(ctx context.Context, organization string, projectId string, reqEditors ...RequestEditorFn) (*http.Response, error)

DeleteProjectData Delete Syfon records and bucket scopes for a project

Corresponds with DELETE /data/projects/{organization}/{project_id} (the `DeleteProjectData` operationId).

func (*Client) ListBucketScopes

func (c *Client) ListBucketScopes(ctx context.Context, bucket string, reqEditors ...RequestEditorFn) (*http.Response, error)

ListBucketScopes List org/project scopes for a bucket

Corresponds with GET /data/buckets/{bucket}/scopes (the `ListBucketScopes` operationId).

func (*Client) ListBuckets

func (c *Client) ListBuckets(ctx context.Context, reqEditors ...RequestEditorFn) (*http.Response, error)

ListBuckets List configured bucket credentials and org/project assignments

Corresponds with GET /data/buckets (the `ListBuckets` operationId).

func (*Client) PutBucket

func (c *Client) PutBucket(ctx context.Context, body PutBucketJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)

PutBucket Upsert bucket credential and claim org/project scope

Takes a body of the `application/json` content type.

Corresponds with PUT /data/buckets (the `PutBucket` operationId).

func (*Client) PutBucketWithBody

func (c *Client) PutBucketWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error)

PutBucketWithBody Upsert bucket credential and claim org/project scope

Takes any type of body and a specified content type.

Corresponds with PUT /data/buckets (the `PutBucket` operationId).

type ClientInterface

type ClientInterface interface {

	// ListBuckets List configured bucket credentials and org/project assignments
	//
	// Corresponds with GET /data/buckets (the `ListBuckets` operationId).
	ListBuckets(ctx context.Context, reqEditors ...RequestEditorFn) (*http.Response, error)

	// PutBucketWithBody Upsert bucket credential and claim org/project scope
	//
	// Takes any type of body and a specified content type.
	//
	// Corresponds with PUT /data/buckets (the `PutBucket` operationId).
	PutBucketWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error)

	// PutBucket Upsert bucket credential and claim org/project scope
	//
	// Takes a body of the `application/json` content type.
	//
	// Corresponds with PUT /data/buckets (the `PutBucket` operationId).
	PutBucket(ctx context.Context, body PutBucketJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)

	// DeleteBucket Delete bucket credential
	//
	// Corresponds with DELETE /data/buckets/{bucket} (the `DeleteBucket` operationId).
	DeleteBucket(ctx context.Context, bucket string, reqEditors ...RequestEditorFn) (*http.Response, error)

	// DeleteBucketScope Remove a specific scope from an existing bucket
	//
	// Corresponds with DELETE /data/buckets/{bucket}/scopes (the `DeleteBucketScope` operationId).
	DeleteBucketScope(ctx context.Context, bucket string, params *DeleteBucketScopeParams, reqEditors ...RequestEditorFn) (*http.Response, error)

	// ListBucketScopes List org/project scopes for a bucket
	//
	// Corresponds with GET /data/buckets/{bucket}/scopes (the `ListBucketScopes` operationId).
	ListBucketScopes(ctx context.Context, bucket string, reqEditors ...RequestEditorFn) (*http.Response, error)

	// AddBucketScopeWithBody Add an org/project scope to an existing bucket
	//
	// Takes any type of body and a specified content type.
	//
	// Corresponds with POST /data/buckets/{bucket}/scopes (the `AddBucketScope` operationId).
	AddBucketScopeWithBody(ctx context.Context, bucket string, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error)

	// AddBucketScope Add an org/project scope to an existing bucket
	//
	// Takes a body of the `application/json` content type.
	//
	// Corresponds with POST /data/buckets/{bucket}/scopes (the `AddBucketScope` operationId).
	AddBucketScope(ctx context.Context, bucket string, body AddBucketScopeJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)

	// DeleteProjectData Delete Syfon records and bucket scopes for a project
	//
	// Corresponds with DELETE /data/projects/{organization}/{project_id} (the `DeleteProjectData` operationId).
	DeleteProjectData(ctx context.Context, organization string, projectId string, reqEditors ...RequestEditorFn) (*http.Response, error)
}

The interface specification for the client above.

type ClientOption

type ClientOption func(*Client) error

ClientOption allows setting custom parameters during construction

func WithBaseURL

func WithBaseURL(baseURL string) ClientOption

WithBaseURL overrides the baseURL.

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) AddBucketScopeWithBodyWithResponse

func (c *ClientWithResponses) AddBucketScopeWithBodyWithResponse(ctx context.Context, bucket string, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*AddBucketScopeResp, error)

AddBucketScopeWithBodyWithResponse request with arbitrary body returning *AddBucketScopeResp

func (*ClientWithResponses) AddBucketScopeWithResponse

func (c *ClientWithResponses) AddBucketScopeWithResponse(ctx context.Context, bucket string, body AddBucketScopeJSONRequestBody, reqEditors ...RequestEditorFn) (*AddBucketScopeResp, error)

func (*ClientWithResponses) DeleteBucketScopeWithResponse

func (c *ClientWithResponses) DeleteBucketScopeWithResponse(ctx context.Context, bucket string, params *DeleteBucketScopeParams, reqEditors ...RequestEditorFn) (*DeleteBucketScopeResp, error)

DeleteBucketScopeWithResponse request returning *DeleteBucketScopeResp

func (*ClientWithResponses) DeleteBucketWithResponse

func (c *ClientWithResponses) DeleteBucketWithResponse(ctx context.Context, bucket string, reqEditors ...RequestEditorFn) (*DeleteBucketResp, error)

DeleteBucketWithResponse request returning *DeleteBucketResp

func (*ClientWithResponses) DeleteProjectDataWithResponse

func (c *ClientWithResponses) DeleteProjectDataWithResponse(ctx context.Context, organization string, projectId string, reqEditors ...RequestEditorFn) (*DeleteProjectDataResp, error)

DeleteProjectDataWithResponse request returning *DeleteProjectDataResp

func (*ClientWithResponses) ListBucketScopesWithResponse

func (c *ClientWithResponses) ListBucketScopesWithResponse(ctx context.Context, bucket string, reqEditors ...RequestEditorFn) (*ListBucketScopesResp, error)

ListBucketScopesWithResponse request returning *ListBucketScopesResp

func (*ClientWithResponses) ListBucketsWithResponse

func (c *ClientWithResponses) ListBucketsWithResponse(ctx context.Context, reqEditors ...RequestEditorFn) (*ListBucketsResp, error)

ListBucketsWithResponse request returning *ListBucketsResp

func (*ClientWithResponses) PutBucketWithBodyWithResponse

func (c *ClientWithResponses) PutBucketWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*PutBucketResp, error)

PutBucketWithBodyWithResponse request with arbitrary body returning *PutBucketResp

func (*ClientWithResponses) PutBucketWithResponse

func (c *ClientWithResponses) PutBucketWithResponse(ctx context.Context, body PutBucketJSONRequestBody, reqEditors ...RequestEditorFn) (*PutBucketResp, error)

type ClientWithResponsesInterface

type ClientWithResponsesInterface interface {
	// ListBucketsWithResponse request
	ListBucketsWithResponse(ctx context.Context, reqEditors ...RequestEditorFn) (*ListBucketsResp, error)

	// PutBucketWithBodyWithResponse request with any body
	PutBucketWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*PutBucketResp, error)

	PutBucketWithResponse(ctx context.Context, body PutBucketJSONRequestBody, reqEditors ...RequestEditorFn) (*PutBucketResp, error)

	// DeleteBucketWithResponse request
	DeleteBucketWithResponse(ctx context.Context, bucket string, reqEditors ...RequestEditorFn) (*DeleteBucketResp, error)

	// DeleteBucketScopeWithResponse request
	DeleteBucketScopeWithResponse(ctx context.Context, bucket string, params *DeleteBucketScopeParams, reqEditors ...RequestEditorFn) (*DeleteBucketScopeResp, error)

	// ListBucketScopesWithResponse request
	ListBucketScopesWithResponse(ctx context.Context, bucket string, reqEditors ...RequestEditorFn) (*ListBucketScopesResp, error)

	// AddBucketScopeWithBodyWithResponse request with any body
	AddBucketScopeWithBodyWithResponse(ctx context.Context, bucket string, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*AddBucketScopeResp, error)

	AddBucketScopeWithResponse(ctx context.Context, bucket string, body AddBucketScopeJSONRequestBody, reqEditors ...RequestEditorFn) (*AddBucketScopeResp, error)

	// DeleteProjectDataWithResponse request
	DeleteProjectDataWithResponse(ctx context.Context, organization string, projectId string, reqEditors ...RequestEditorFn) (*DeleteProjectDataResp, error)
}

ClientWithResponsesInterface is the interface specification for the client with responses above.

type DeleteBucket204Response

type DeleteBucket204Response struct {
}

func (DeleteBucket204Response) VisitDeleteBucketResponse

func (response DeleteBucket204Response) VisitDeleteBucketResponse(ctx fiber.Ctx) error

type DeleteBucket400JSONResponse

type DeleteBucket400JSONResponse APIError

func (DeleteBucket400JSONResponse) VisitDeleteBucketResponse

func (response DeleteBucket400JSONResponse) VisitDeleteBucketResponse(ctx fiber.Ctx) error

type DeleteBucket401JSONResponse

type DeleteBucket401JSONResponse APIError

func (DeleteBucket401JSONResponse) VisitDeleteBucketResponse

func (response DeleteBucket401JSONResponse) VisitDeleteBucketResponse(ctx fiber.Ctx) error

type DeleteBucket403JSONResponse

type DeleteBucket403JSONResponse APIError

func (DeleteBucket403JSONResponse) VisitDeleteBucketResponse

func (response DeleteBucket403JSONResponse) VisitDeleteBucketResponse(ctx fiber.Ctx) error

type DeleteBucket404JSONResponse

type DeleteBucket404JSONResponse APIError

func (DeleteBucket404JSONResponse) VisitDeleteBucketResponse

func (response DeleteBucket404JSONResponse) VisitDeleteBucketResponse(ctx fiber.Ctx) error

type DeleteBucket500JSONResponse

type DeleteBucket500JSONResponse APIError

func (DeleteBucket500JSONResponse) VisitDeleteBucketResponse

func (response DeleteBucket500JSONResponse) VisitDeleteBucketResponse(ctx fiber.Ctx) error

type DeleteBucketRequestObject

type DeleteBucketRequestObject struct {
	Bucket string `json:"bucket"`
}

type DeleteBucketResp

type DeleteBucketResp struct {
	Body         []byte
	HTTPResponse *http.Response
	JSON400      *APIError
	JSON401      *APIError
	JSON403      *APIError
	JSON404      *APIError
	JSON500      *APIError
}

func ParseDeleteBucketResp

func ParseDeleteBucketResp(rsp *http.Response) (*DeleteBucketResp, error)

ParseDeleteBucketResp parses an HTTP response from a DeleteBucketWithResponse call

func (DeleteBucketResp) Status

func (r DeleteBucketResp) Status() string

Status returns HTTPResponse.Status

func (DeleteBucketResp) StatusCode

func (r DeleteBucketResp) StatusCode() int

StatusCode returns HTTPResponse.StatusCode

type DeleteBucketResponseObject

type DeleteBucketResponseObject interface {
	VisitDeleteBucketResponse(ctx fiber.Ctx) error
}

type DeleteBucketScope204Response

type DeleteBucketScope204Response struct {
}

func (DeleteBucketScope204Response) VisitDeleteBucketScopeResponse

func (response DeleteBucketScope204Response) VisitDeleteBucketScopeResponse(ctx fiber.Ctx) error

type DeleteBucketScope400JSONResponse

type DeleteBucketScope400JSONResponse APIError

func (DeleteBucketScope400JSONResponse) VisitDeleteBucketScopeResponse

func (response DeleteBucketScope400JSONResponse) VisitDeleteBucketScopeResponse(ctx fiber.Ctx) error

type DeleteBucketScope401JSONResponse

type DeleteBucketScope401JSONResponse APIError

func (DeleteBucketScope401JSONResponse) VisitDeleteBucketScopeResponse

func (response DeleteBucketScope401JSONResponse) VisitDeleteBucketScopeResponse(ctx fiber.Ctx) error

type DeleteBucketScope403JSONResponse

type DeleteBucketScope403JSONResponse APIError

func (DeleteBucketScope403JSONResponse) VisitDeleteBucketScopeResponse

func (response DeleteBucketScope403JSONResponse) VisitDeleteBucketScopeResponse(ctx fiber.Ctx) error

type DeleteBucketScope404JSONResponse

type DeleteBucketScope404JSONResponse APIError

func (DeleteBucketScope404JSONResponse) VisitDeleteBucketScopeResponse

func (response DeleteBucketScope404JSONResponse) VisitDeleteBucketScopeResponse(ctx fiber.Ctx) error

type DeleteBucketScope500JSONResponse

type DeleteBucketScope500JSONResponse APIError

func (DeleteBucketScope500JSONResponse) VisitDeleteBucketScopeResponse

func (response DeleteBucketScope500JSONResponse) VisitDeleteBucketScopeResponse(ctx fiber.Ctx) error

type DeleteBucketScopeParams

type DeleteBucketScopeParams struct {
	Organization string  `form:"organization" json:"organization"`
	Path         string  `form:"path" json:"path"`
	ProjectId    *string `form:"project_id,omitempty" json:"project_id,omitempty"`
}

DeleteBucketScopeParams defines parameters for DeleteBucketScope.

type DeleteBucketScopeRequestObject

type DeleteBucketScopeRequestObject struct {
	Bucket string `json:"bucket"`
	Params DeleteBucketScopeParams
}

type DeleteBucketScopeResp

type DeleteBucketScopeResp struct {
	Body         []byte
	HTTPResponse *http.Response
	JSON400      *APIError
	JSON401      *APIError
	JSON403      *APIError
	JSON404      *APIError
	JSON500      *APIError
}

func ParseDeleteBucketScopeResp

func ParseDeleteBucketScopeResp(rsp *http.Response) (*DeleteBucketScopeResp, error)

ParseDeleteBucketScopeResp parses an HTTP response from a DeleteBucketScopeWithResponse call

func (DeleteBucketScopeResp) Status

func (r DeleteBucketScopeResp) Status() string

Status returns HTTPResponse.Status

func (DeleteBucketScopeResp) StatusCode

func (r DeleteBucketScopeResp) StatusCode() int

StatusCode returns HTTPResponse.StatusCode

type DeleteBucketScopeResponseObject

type DeleteBucketScopeResponseObject interface {
	VisitDeleteBucketScopeResponse(ctx fiber.Ctx) error
}

type DeleteProjectData200JSONResponse

type DeleteProjectData200JSONResponse DeleteProjectDataResponse

func (DeleteProjectData200JSONResponse) VisitDeleteProjectDataResponse

func (response DeleteProjectData200JSONResponse) VisitDeleteProjectDataResponse(ctx fiber.Ctx) error

type DeleteProjectData400JSONResponse

type DeleteProjectData400JSONResponse APIError

func (DeleteProjectData400JSONResponse) VisitDeleteProjectDataResponse

func (response DeleteProjectData400JSONResponse) VisitDeleteProjectDataResponse(ctx fiber.Ctx) error

type DeleteProjectData401JSONResponse

type DeleteProjectData401JSONResponse APIError

func (DeleteProjectData401JSONResponse) VisitDeleteProjectDataResponse

func (response DeleteProjectData401JSONResponse) VisitDeleteProjectDataResponse(ctx fiber.Ctx) error

type DeleteProjectData403JSONResponse

type DeleteProjectData403JSONResponse APIError

func (DeleteProjectData403JSONResponse) VisitDeleteProjectDataResponse

func (response DeleteProjectData403JSONResponse) VisitDeleteProjectDataResponse(ctx fiber.Ctx) error

type DeleteProjectData404JSONResponse added in v0.3.4

type DeleteProjectData404JSONResponse APIError

func (DeleteProjectData404JSONResponse) VisitDeleteProjectDataResponse added in v0.3.4

func (response DeleteProjectData404JSONResponse) VisitDeleteProjectDataResponse(ctx fiber.Ctx) error

type DeleteProjectData500JSONResponse

type DeleteProjectData500JSONResponse APIError

func (DeleteProjectData500JSONResponse) VisitDeleteProjectDataResponse

func (response DeleteProjectData500JSONResponse) VisitDeleteProjectDataResponse(ctx fiber.Ctx) error

type DeleteProjectDataRequestObject

type DeleteProjectDataRequestObject struct {
	Organization string `json:"organization"`
	ProjectId    string `json:"project_id"`
}

type DeleteProjectDataResp

type DeleteProjectDataResp struct {
	Body         []byte
	HTTPResponse *http.Response
	JSON200      *DeleteProjectDataResponse
	JSON400      *APIError
	JSON401      *APIError
	JSON403      *APIError
	JSON404      *APIError
	JSON500      *APIError
}

func ParseDeleteProjectDataResp

func ParseDeleteProjectDataResp(rsp *http.Response) (*DeleteProjectDataResp, error)

ParseDeleteProjectDataResp parses an HTTP response from a DeleteProjectDataWithResponse call

func (DeleteProjectDataResp) Status

func (r DeleteProjectDataResp) Status() string

Status returns HTTPResponse.Status

func (DeleteProjectDataResp) StatusCode

func (r DeleteProjectDataResp) StatusCode() int

StatusCode returns HTTPResponse.StatusCode

type DeleteProjectDataResponse

type DeleteProjectDataResponse struct {
	DeletedBucketScopes int    `json:"deleted_bucket_scopes"`
	DeletedObjects      int    `json:"deleted_objects"`
	Organization        string `json:"organization"`
	ProjectId           string `json:"project_id"`
}

DeleteProjectDataResponse defines model for DeleteProjectDataResponse.

type DeleteProjectDataResponseObject

type DeleteProjectDataResponseObject interface {
	VisitDeleteProjectDataResponse(ctx fiber.Ctx) error
}

type FiberServerOptions

type FiberServerOptions struct {
	BaseURL            string
	Middlewares        []MiddlewareFunc
	HandlerMiddlewares []HandlerMiddlewareFunc
}

FiberServerOptions provides options for the Fiber server.

type HandlerMiddlewareFunc added in v0.3.3

type HandlerMiddlewareFunc func(c fiber.Ctx, next fiber.Handler) error

type HttpRequestDoer

type HttpRequestDoer interface {
	Do(req *http.Request) (*http.Response, error)
}

Doer performs HTTP requests.

The standard http.Client implements this interface.

type ListBucketScopes200JSONResponse

type ListBucketScopes200JSONResponse []BucketScopeResponse

func (ListBucketScopes200JSONResponse) VisitListBucketScopesResponse

func (response ListBucketScopes200JSONResponse) VisitListBucketScopesResponse(ctx fiber.Ctx) error

type ListBucketScopes401JSONResponse

type ListBucketScopes401JSONResponse APIError

func (ListBucketScopes401JSONResponse) VisitListBucketScopesResponse

func (response ListBucketScopes401JSONResponse) VisitListBucketScopesResponse(ctx fiber.Ctx) error

type ListBucketScopes403JSONResponse

type ListBucketScopes403JSONResponse APIError

func (ListBucketScopes403JSONResponse) VisitListBucketScopesResponse

func (response ListBucketScopes403JSONResponse) VisitListBucketScopesResponse(ctx fiber.Ctx) error

type ListBucketScopes404JSONResponse

type ListBucketScopes404JSONResponse APIError

func (ListBucketScopes404JSONResponse) VisitListBucketScopesResponse

func (response ListBucketScopes404JSONResponse) VisitListBucketScopesResponse(ctx fiber.Ctx) error

type ListBucketScopes500JSONResponse

type ListBucketScopes500JSONResponse APIError

func (ListBucketScopes500JSONResponse) VisitListBucketScopesResponse

func (response ListBucketScopes500JSONResponse) VisitListBucketScopesResponse(ctx fiber.Ctx) error

type ListBucketScopesRequestObject

type ListBucketScopesRequestObject struct {
	Bucket string `json:"bucket"`
}

type ListBucketScopesResp

type ListBucketScopesResp struct {
	Body         []byte
	HTTPResponse *http.Response
	JSON200      *[]BucketScopeResponse
	JSON401      *APIError
	JSON403      *APIError
	JSON404      *APIError
	JSON500      *APIError
}

func ParseListBucketScopesResp

func ParseListBucketScopesResp(rsp *http.Response) (*ListBucketScopesResp, error)

ParseListBucketScopesResp parses an HTTP response from a ListBucketScopesWithResponse call

func (ListBucketScopesResp) Status

func (r ListBucketScopesResp) Status() string

Status returns HTTPResponse.Status

func (ListBucketScopesResp) StatusCode

func (r ListBucketScopesResp) StatusCode() int

StatusCode returns HTTPResponse.StatusCode

type ListBucketScopesResponseObject

type ListBucketScopesResponseObject interface {
	VisitListBucketScopesResponse(ctx fiber.Ctx) error
}

type ListBuckets200JSONResponse

type ListBuckets200JSONResponse BucketsResponse

func (ListBuckets200JSONResponse) VisitListBucketsResponse

func (response ListBuckets200JSONResponse) VisitListBucketsResponse(ctx fiber.Ctx) error

type ListBuckets401JSONResponse

type ListBuckets401JSONResponse APIError

func (ListBuckets401JSONResponse) VisitListBucketsResponse

func (response ListBuckets401JSONResponse) VisitListBucketsResponse(ctx fiber.Ctx) error

type ListBuckets403JSONResponse

type ListBuckets403JSONResponse APIError

func (ListBuckets403JSONResponse) VisitListBucketsResponse

func (response ListBuckets403JSONResponse) VisitListBucketsResponse(ctx fiber.Ctx) error

type ListBuckets500JSONResponse

type ListBuckets500JSONResponse APIError

func (ListBuckets500JSONResponse) VisitListBucketsResponse

func (response ListBuckets500JSONResponse) VisitListBucketsResponse(ctx fiber.Ctx) error

type ListBucketsRequestObject

type ListBucketsRequestObject struct {
}

type ListBucketsResp

type ListBucketsResp struct {
	Body         []byte
	HTTPResponse *http.Response
	JSON200      *BucketsResponse
	JSON401      *APIError
	JSON403      *APIError
	JSON500      *APIError
}

func ParseListBucketsResp

func ParseListBucketsResp(rsp *http.Response) (*ListBucketsResp, error)

ParseListBucketsResp parses an HTTP response from a ListBucketsWithResponse call

func (ListBucketsResp) Status

func (r ListBucketsResp) Status() string

Status returns HTTPResponse.Status

func (ListBucketsResp) StatusCode

func (r ListBucketsResp) StatusCode() int

StatusCode returns HTTPResponse.StatusCode

type ListBucketsResponseObject

type ListBucketsResponseObject interface {
	VisitListBucketsResponse(ctx fiber.Ctx) error
}

type MiddlewareFunc

type MiddlewareFunc fiber.Handler

type PutBucket201Response

type PutBucket201Response struct {
}

func (PutBucket201Response) VisitPutBucketResponse

func (response PutBucket201Response) VisitPutBucketResponse(ctx fiber.Ctx) error

type PutBucket400JSONResponse

type PutBucket400JSONResponse APIError

func (PutBucket400JSONResponse) VisitPutBucketResponse

func (response PutBucket400JSONResponse) VisitPutBucketResponse(ctx fiber.Ctx) error

type PutBucket401JSONResponse

type PutBucket401JSONResponse APIError

func (PutBucket401JSONResponse) VisitPutBucketResponse

func (response PutBucket401JSONResponse) VisitPutBucketResponse(ctx fiber.Ctx) error

type PutBucket403JSONResponse

type PutBucket403JSONResponse APIError

func (PutBucket403JSONResponse) VisitPutBucketResponse

func (response PutBucket403JSONResponse) VisitPutBucketResponse(ctx fiber.Ctx) error

type PutBucket409JSONResponse

type PutBucket409JSONResponse APIError

func (PutBucket409JSONResponse) VisitPutBucketResponse

func (response PutBucket409JSONResponse) VisitPutBucketResponse(ctx fiber.Ctx) error

type PutBucket500JSONResponse

type PutBucket500JSONResponse APIError

func (PutBucket500JSONResponse) VisitPutBucketResponse

func (response PutBucket500JSONResponse) VisitPutBucketResponse(ctx fiber.Ctx) error

type PutBucketJSONRequestBody

type PutBucketJSONRequestBody = PutBucketRequest

PutBucketJSONRequestBody defines body for PutBucket for application/json ContentType.

type PutBucketRequest

type PutBucketRequest struct {
	AccessKey    *string `json:"access_key,omitempty"`
	Bucket       string  `json:"bucket"`
	Endpoint     *string `json:"endpoint,omitempty"`
	Organization string  `json:"organization"`

	// Path Optional s3://bucket/prefix path override
	Path      *string `json:"path,omitempty"`
	ProjectId string  `json:"project_id"`

	// Provider Storage backend provider (s3|gcs|azure|file). Defaults to s3.
	Provider  *string `json:"provider,omitempty"`
	Region    *string `json:"region,omitempty"`
	SecretKey *string `json:"secret_key,omitempty"`
}

PutBucketRequest defines model for PutBucketRequest.

type PutBucketRequestObject

type PutBucketRequestObject struct {
	Body *PutBucketJSONRequestBody
}

type PutBucketResp

type PutBucketResp struct {
	Body         []byte
	HTTPResponse *http.Response
	JSON400      *APIError
	JSON401      *APIError
	JSON403      *APIError
	JSON409      *APIError
	JSON500      *APIError
}

func ParsePutBucketResp

func ParsePutBucketResp(rsp *http.Response) (*PutBucketResp, error)

ParsePutBucketResp parses an HTTP response from a PutBucketWithResponse call

func (PutBucketResp) Status

func (r PutBucketResp) Status() string

Status returns HTTPResponse.Status

func (PutBucketResp) StatusCode

func (r PutBucketResp) StatusCode() int

StatusCode returns HTTPResponse.StatusCode

type PutBucketResponseObject

type PutBucketResponseObject interface {
	VisitPutBucketResponse(ctx fiber.Ctx) error
}

type RequestEditorFn

type RequestEditorFn func(ctx context.Context, req *http.Request) error

RequestEditorFn is the function signature for the RequestEditor callback function

type ServerInterface

type ServerInterface interface {
	// ListBuckets List configured bucket credentials and org/project assignments
	// (GET /data/buckets)
	ListBuckets(c fiber.Ctx) error
	// PutBucket Upsert bucket credential and claim org/project scope
	// (PUT /data/buckets)
	PutBucket(c fiber.Ctx) error
	// DeleteBucket Delete bucket credential
	// (DELETE /data/buckets/{bucket})
	DeleteBucket(c fiber.Ctx, bucket string) error
	// DeleteBucketScope Remove a specific scope from an existing bucket
	// (DELETE /data/buckets/{bucket}/scopes)
	DeleteBucketScope(c fiber.Ctx, bucket string, params DeleteBucketScopeParams) error
	// ListBucketScopes List org/project scopes for a bucket
	// (GET /data/buckets/{bucket}/scopes)
	ListBucketScopes(c fiber.Ctx, bucket string) error
	// AddBucketScope Add an org/project scope to an existing bucket
	// (POST /data/buckets/{bucket}/scopes)
	AddBucketScope(c fiber.Ctx, bucket string) error
	// DeleteProjectData Delete Syfon records and bucket scopes for a project
	// (DELETE /data/projects/{organization}/{project_id})
	DeleteProjectData(c fiber.Ctx, organization string, projectId string) error
}

ServerInterface represents all server handlers.

func NewStrictHandler

func NewStrictHandler(ssi StrictServerInterface, middlewares []StrictMiddlewareFunc) ServerInterface

type ServerInterfaceWrapper

type ServerInterfaceWrapper struct {
	Handler            ServerInterface
	HandlerMiddlewares []HandlerMiddlewareFunc
}

ServerInterfaceWrapper converts contexts to parameters.

func (*ServerInterfaceWrapper) AddBucketScope

func (siw *ServerInterfaceWrapper) AddBucketScope(c fiber.Ctx) error

AddBucketScope operation middleware

func (*ServerInterfaceWrapper) DeleteBucket

func (siw *ServerInterfaceWrapper) DeleteBucket(c fiber.Ctx) error

DeleteBucket operation middleware

func (*ServerInterfaceWrapper) DeleteBucketScope

func (siw *ServerInterfaceWrapper) DeleteBucketScope(c fiber.Ctx) error

DeleteBucketScope operation middleware

func (*ServerInterfaceWrapper) DeleteProjectData

func (siw *ServerInterfaceWrapper) DeleteProjectData(c fiber.Ctx) error

DeleteProjectData operation middleware

func (*ServerInterfaceWrapper) ListBucketScopes

func (siw *ServerInterfaceWrapper) ListBucketScopes(c fiber.Ctx) error

ListBucketScopes operation middleware

func (*ServerInterfaceWrapper) ListBuckets

func (siw *ServerInterfaceWrapper) ListBuckets(c fiber.Ctx) error

ListBuckets operation middleware

func (*ServerInterfaceWrapper) PutBucket

func (siw *ServerInterfaceWrapper) PutBucket(c fiber.Ctx) error

PutBucket operation middleware

type StrictHandlerFunc

type StrictHandlerFunc func(ctx fiber.Ctx, args any) (any, error)

type StrictMiddlewareFunc

type StrictMiddlewareFunc func(f StrictHandlerFunc, operationID string) StrictHandlerFunc

type StrictServerInterface

type StrictServerInterface interface {
	// ListBuckets List configured bucket credentials and org/project assignments
	// (GET /data/buckets)
	ListBuckets(ctx context.Context, request ListBucketsRequestObject) (ListBucketsResponseObject, error)
	// PutBucket Upsert bucket credential and claim org/project scope
	// (PUT /data/buckets)
	PutBucket(ctx context.Context, request PutBucketRequestObject) (PutBucketResponseObject, error)
	// DeleteBucket Delete bucket credential
	// (DELETE /data/buckets/{bucket})
	DeleteBucket(ctx context.Context, request DeleteBucketRequestObject) (DeleteBucketResponseObject, error)
	// DeleteBucketScope Remove a specific scope from an existing bucket
	// (DELETE /data/buckets/{bucket}/scopes)
	DeleteBucketScope(ctx context.Context, request DeleteBucketScopeRequestObject) (DeleteBucketScopeResponseObject, error)
	// ListBucketScopes List org/project scopes for a bucket
	// (GET /data/buckets/{bucket}/scopes)
	ListBucketScopes(ctx context.Context, request ListBucketScopesRequestObject) (ListBucketScopesResponseObject, error)
	// AddBucketScope Add an org/project scope to an existing bucket
	// (POST /data/buckets/{bucket}/scopes)
	AddBucketScope(ctx context.Context, request AddBucketScopeRequestObject) (AddBucketScopeResponseObject, error)
	// DeleteProjectData Delete Syfon records and bucket scopes for a project
	// (DELETE /data/projects/{organization}/{project_id})
	DeleteProjectData(ctx context.Context, request DeleteProjectDataRequestObject) (DeleteProjectDataResponseObject, error)
}

StrictServerInterface represents all server handlers.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL