apiserver

package
v0.8.3 Latest Latest
Warning

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

Go to latest
Published: Mar 25, 2024 License: GPL-3.0 Imports: 12 Imported by: 0

Documentation

Overview

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

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

Index

Constants

View Source
const (
	BearerAuthScopes = "BearerAuth.Scopes"
	CookieAuthScopes = "CookieAuth.Scopes"
)

Variables

This section is empty.

Functions

func GetSwagger

func GetSwagger() (swagger *openapi3.T, err error)

GetSwagger returns the Swagger specification corresponding to the generated code in this file. The external references of Swagger specification are resolved. The logic of resolving external references is tightly connected to "import-mapping" feature. Externally referenced files must be embedded in the corresponding golang packages. Urls can be supported but this task was out of the scope.

func PathToRawSpec

func PathToRawSpec(pathToFile string) map[string]func() ([]byte, error)

Constructs a synthetic filesystem for resolving external references when loading openapi specifications.

func RegisterHandlers

func RegisterHandlers(router EchoRouter, si ServerInterface)

RegisterHandlers adds each server route to the EchoRouter.

func RegisterHandlersWithBaseURL

func RegisterHandlersWithBaseURL(router EchoRouter, si ServerInterface, baseURL string)

Registers handlers, and prepends BaseURL to the paths, so that the paths can be served under a prefix.

Types

type Action

type Action string

Action Rule execution result action in NeoFS EACL. Either allows or denies access if the rule's filters match.

const (
	ALLOW Action = "ALLOW"
	DENY  Action = "DENY"
)

Defines values for Action.

type Address

type Address struct {
	ContainerId string `json:"containerId"`
	ObjectId    string `json:"objectId"`
}

Address Address of the object in NeoFS.

type AddressForUpload

type AddressForUpload struct {
	ContainerId string `json:"container_id"`
	ObjectId    string `json:"object_id"`
}

AddressForUpload Address of the object in NeoFS.

type AttrKey

type AttrKey = string

AttrKey defines model for attrKey.

type AttrVal

type AttrVal = string

AttrVal defines model for attrVal.

type Attribute

type Attribute struct {
	Key   string `json:"key"`
	Value string `json:"value"`
}

Attribute Attribute is a pair of strings that can be attached to a container or an object.

type AuthJSONBody

type AuthJSONBody = []Bearer

AuthJSONBody defines parameters for Auth.

type AuthJSONRequestBody

type AuthJSONRequestBody = AuthJSONBody

AuthJSONRequestBody defines body for Auth for application/json ContentType.

type AuthParams

type AuthParams struct {
	// XBearerOwnerId Owner Id (wallet address) that will sign the token.
	XBearerOwnerId string `json:"X-Bearer-Owner-Id"`

	// XBearerLifetime Token lifetime in epoch.
	XBearerLifetime *int `json:"X-Bearer-Lifetime,omitempty"`

	// XBearerForAllUsers Form token for all users or only for this gate.
	XBearerForAllUsers *bool `json:"X-Bearer-For-All-Users,omitempty"`
}

AuthParams defines parameters for Auth.

type Balance

type Balance struct {
	Address   string `json:"address"`
	Precision uint32 `json:"precision"`
	Value     string `json:"value"`
}

Balance defines model for Balance.

type Bearer

type Bearer struct {
	// Container Container session token rule.
	Container *Rule    `json:"container,omitempty"`
	Name      string   `json:"name,omitempty"`
	Object    []Record `json:"object"`
}

Bearer Bearer token that is expected to be formed.

type BinaryBearer

type BinaryBearer struct {
	// Token Base64 encoded bearer token.
	Token string `json:"token"`
}

BinaryBearer Bearer token for object operations that is represented in binary form.

type ContainerId

type ContainerId = string

ContainerId defines model for containerId.

type ContainerInfo

type ContainerInfo struct {
	Attributes []Attribute `json:"attributes"`
	BasicAcl   string      `json:"basicAcl"`

	// CannedAcl The friendly name for the basicAcl field.
	CannedAcl       *string `json:"cannedAcl,omitempty"`
	ContainerId     string  `json:"containerId"`
	ContainerName   string  `json:"containerName"`
	OwnerId         string  `json:"ownerId"`
	PlacementPolicy string  `json:"placementPolicy"`
	Version         string  `json:"version"`
}

ContainerInfo Information about container.

type ContainerList

type ContainerList struct {
	Containers []ContainerInfo `json:"containers"`
	Size       int             `json:"size"`
}

ContainerList List of containers info

type ContainerPutInfo

type ContainerPutInfo struct {
	Attributes      []Attribute `json:"attributes,omitempty"`
	BasicAcl        string      `json:"basicAcl,omitempty"`
	ContainerName   string      `json:"containerName,omitempty"`
	PlacementPolicy string      `json:"placementPolicy,omitempty"`
}

ContainerPutInfo <p>Request body to create container. To specify container name use appropriate property (name provided in attributes will be ignored).<p> <p>To create a container you must provide <code>PlacementPolicy</code> and <code>BasicACL</code>.</p>

<h5>Placement policy</h5> <p>Placement policy allows you control where and how the container (and its object) is stored. For example, you want to store 3 copies of every object, so you can use the following policy:</p> <pre><code>REP 3</code></pre> <p><a href="https://github.com/nspcc-dev/neofs-spec/blob/master/01-arch/02-policy.md">More about policy</a>.</p>

<h5>Basic ACL</h5> <p>Basic ACL is a part of the container structure, and it is always created simultaneously with the container. Therefore, it is never subject to any changes. It is a 32-bit integer with a bit field in the following format:</p> <p><img src="https://raw.githubusercontent.com/nspcc-dev/neofs-spec/046e623dc2d8134ab2b85fcaf831077d574561a2/01-arch/pic/acl-basic-private.svg" alt="ACL Basic"></p>

<table>

<thead>
    <tr>
        <th>Symbol</th>
        <th>Meaning</th>
        <th>Description</th>
    </tr>
</thead>
<tbody>
    <tr>
        <td>B</td>
        <td>Bearer</td>
        <td>Allows using Bear Token ACL rules to replace eACL rules</td>
    </tr>
    <tr>
        <td>U</td>
        <td>User</td>
        <td>The owner of the container identified by the public key linked to the container</td>
    </tr>
    <tr>
        <td>S</td>
        <td>System</td>
        <td>Inner Ring and/or container nodes in the current version of network map. IR nodes can only perform <code>GetRangeHash</code>, <code>Head</code>, and <code>Search</code> necessary for data audit. Container nodes can only do things required for the replication.</td>
    </tr>
    <tr>
        <td>O</td>
        <td>Others</td>
        <td>Clients that do not match any of the categories above</td>
    </tr>
    <tr>
        <td>F</td>
        <td>Final</td>
        <td>Flag denying Extended ACL. If set, Basic ACL check is final, Extended ACL is ignored</td>
    </tr>
    <tr>
        <td>X</td>
        <td>Sticky</td>
        <td>Flag denying different owners of the request and the object. If set, object in <code>Put</code> request must have one <code>Owner</code> and be signed with the same signature. If not set, the object must be correct but can be of any owner. The nodes falling for <code>SYSTEM</code> role are exceptions from this rule. For them, the bit is ignored.</td>
    </tr>
    <tr>
        <td>0</td>
        <td>Deny</td>
        <td>Denies operation of the identified category</td>
    </tr>
    <tr>
        <td>1</td>
        <td>Allow</td>
        <td>Allows operation of the identified category</td>
    </tr>
</tbody>

</table> <p>To upload objects with a bearer token your container must have Bearer bits set. For example, you can use <code>0x0FBFBFFF</code> or predefined <code>eacl-public-read-write</code> values.</p> <p>Also, don't forget to set appropriate eACL to restrict your container.</p> <p><a href="https://github.com/nspcc-dev/neofs-spec/blob/master/01-arch/07-acl.md">More about ACL</a>.</p>

type DeleteContainerParams

type DeleteContainerParams struct {
	// WalletConnect Use wallet connect signature scheme or native NeoFS signature.
	WalletConnect *SignatureScheme `form:"walletConnect,omitempty" json:"walletConnect,omitempty"`

	// XBearerSignature Base64 encoded signature for bearer token.
	XBearerSignature *SignatureParam `json:"X-Bearer-Signature,omitempty"`

	// XBearerSignatureKey Hex encoded the public part of the key that signed the bearer token.
	XBearerSignatureKey *SignatureKeyParam `json:"X-Bearer-Signature-Key,omitempty"`
}

DeleteContainerParams defines parameters for DeleteContainer.

type DeleteObjectParams

type DeleteObjectParams struct {
	// WalletConnect Use wallet connect signature scheme or native NeoFS signature.
	WalletConnect *SignatureScheme `form:"walletConnect,omitempty" json:"walletConnect,omitempty"`

	// FullBearer Provided bearer token is final or gate should assemble it using signature.
	FullBearer *FullBearerToken `form:"fullBearer,omitempty" json:"fullBearer,omitempty"`

	// XBearerSignature Base64 encoded signature for bearer token.
	XBearerSignature *SignatureParam `json:"X-Bearer-Signature,omitempty"`

	// XBearerSignatureKey Hex encoded the public part of the key that signed the bearer token.
	XBearerSignatureKey *SignatureKeyParam `json:"X-Bearer-Signature-Key,omitempty"`
}

DeleteObjectParams defines parameters for DeleteObject.

type Eacl

type Eacl struct {
	ContainerId string   `json:"containerId"`
	Records     []Record `json:"records"`
}

Eacl EACL NeoFS table.

type EchoRouter

type EchoRouter interface {
	CONNECT(path string, h echo.HandlerFunc, m ...echo.MiddlewareFunc) *echo.Route
	DELETE(path string, h echo.HandlerFunc, m ...echo.MiddlewareFunc) *echo.Route
	GET(path string, h echo.HandlerFunc, m ...echo.MiddlewareFunc) *echo.Route
	HEAD(path string, h echo.HandlerFunc, m ...echo.MiddlewareFunc) *echo.Route
	OPTIONS(path string, h echo.HandlerFunc, m ...echo.MiddlewareFunc) *echo.Route
	PATCH(path string, h echo.HandlerFunc, m ...echo.MiddlewareFunc) *echo.Route
	POST(path string, h echo.HandlerFunc, m ...echo.MiddlewareFunc) *echo.Route
	PUT(path string, h echo.HandlerFunc, m ...echo.MiddlewareFunc) *echo.Route
	TRACE(path string, h echo.HandlerFunc, m ...echo.MiddlewareFunc) *echo.Route
}

This is a simple interface which specifies echo.Route addition functions which are present on both echo.Echo and echo.Group, since we want to allow using either of them for path registration

type ErrorResponse

type ErrorResponse struct {
	Code    uint32 `json:"code,omitempty"`
	Message string `json:"message"`

	// Type Error type. Allow determine source of the error.
	Type ErrorType `json:"type"`
}

ErrorResponse <p>Error response.</p> <p>More about NeoFS status code you can find

<a href="https://github.com/nspcc-dev/neofs-spec/blob/master/20-api-v2/status.md">here</a>.</p>

type ErrorType

type ErrorType string

ErrorType Error type. Allow determine source of the error.

const (
	API ErrorType = "API"
	GW  ErrorType = "GW"
)

Defines values for ErrorType.

type Filter

type Filter struct {
	// HeaderType Enumeration of possible sources of Headers to apply filters in NeoFS EACL.
	HeaderType HeaderType `json:"headerType"`
	Key        string     `json:"key"`

	// MatchType Match type in NeoFS EACL filter.
	MatchType MatchType `json:"matchType"`
	Value     string    `json:"value"`
}

Filter Filter in NeoFS EACL to check particular properties of the request or the object.

type FormBinaryBearerParams

type FormBinaryBearerParams struct {
	// WalletConnect Use wallet connect signature scheme or native NeoFS signature.
	WalletConnect *SignatureScheme `form:"walletConnect,omitempty" json:"walletConnect,omitempty"`

	// XBearerSignature Base64 encoded signature for bearer token.
	XBearerSignature *SignatureParam `json:"X-Bearer-Signature,omitempty"`

	// XBearerSignatureKey Hex encoded the public part of the key that signed the bearer token.
	XBearerSignatureKey *SignatureKeyParam `json:"X-Bearer-Signature-Key,omitempty"`
}

FormBinaryBearerParams defines parameters for FormBinaryBearer.

type FullBearerToken

type FullBearerToken = bool

FullBearerToken defines model for fullBearerToken.

type GetByAttributeParams

type GetByAttributeParams struct {
	// Download Set the Content-Disposition header as attachment in response. This makes the browser to download object as file instead of showing it on the page.
	Download *string `form:"download,omitempty" json:"download,omitempty"`
}

GetByAttributeParams defines parameters for GetByAttribute.

type GetContainerObjectParams

type GetContainerObjectParams struct {
	// Download Set the Content-Disposition header as attachment in response. This make the browser to download object as file instead of showing it on the page.
	Download *string `form:"download,omitempty" json:"download,omitempty"`
}

GetContainerObjectParams defines parameters for GetContainerObject.

type GetObjectInfoParams

type GetObjectInfoParams struct {
	// WalletConnect Use wallet connect signature scheme or native NeoFS signature.
	WalletConnect *SignatureScheme `form:"walletConnect,omitempty" json:"walletConnect,omitempty"`

	// FullBearer Provided bearer token is final or gate should assemble it using signature.
	FullBearer *FullBearerToken `form:"fullBearer,omitempty" json:"fullBearer,omitempty"`

	// RangeOffset Range offset to start reading data.
	RangeOffset *int64 `form:"range-offset,omitempty" json:"range-offset,omitempty"`

	// RangeLength Length of data range.
	RangeLength *int64 `form:"range-length,omitempty" json:"range-length,omitempty"`

	// MaxPayloadSize Max payload size (in bytes) that can be included in the response.
	// If the actual size is greater than this params the payload won't be included in the response.
	MaxPayloadSize *int `form:"max-payload-size,omitempty" json:"max-payload-size,omitempty"`

	// XBearerSignature Base64 encoded signature for bearer token.
	XBearerSignature *SignatureParam `json:"X-Bearer-Signature,omitempty"`

	// XBearerSignatureKey Hex encoded the public part of the key that signed the bearer token.
	XBearerSignatureKey *SignatureKeyParam `json:"X-Bearer-Signature-Key,omitempty"`
}

GetObjectInfoParams defines parameters for GetObjectInfo.

type HeadByAttributeParams

type HeadByAttributeParams struct {
	// Download Set the Content-Disposition header as attachment in response. This makes the browser to download object as file instead of showing it on the page.
	Download *string `form:"download,omitempty" json:"download,omitempty"`
}

HeadByAttributeParams defines parameters for HeadByAttribute.

type HeadContainerObjectParams

type HeadContainerObjectParams struct {
	// Download Set the Content-Disposition header as attachment in response. This make the browser to download object as file instead of showing it on the page.
	Download *string `form:"download,omitempty" json:"download,omitempty"`
}

HeadContainerObjectParams defines parameters for HeadContainerObject.

type HeaderType

type HeaderType string

HeaderType Enumeration of possible sources of Headers to apply filters in NeoFS EACL.

const (
	OBJECT  HeaderType = "OBJECT"
	REQUEST HeaderType = "REQUEST"
	SERVICE HeaderType = "SERVICE"
)

Defines values for HeaderType.

type ListContainersParams

type ListContainersParams struct {
	// OwnerId Base58 encoded owner id.
	OwnerId string `form:"ownerId" json:"ownerId"`

	// Offset The number of containers to skip before starting to collect the result set.
	Offset *int `form:"offset,omitempty" json:"offset,omitempty"`

	// Limit The numbers of containers to return.
	Limit *int `form:"limit,omitempty" json:"limit,omitempty"`
}

ListContainersParams defines parameters for ListContainers.

type MatchType

type MatchType string

MatchType Match type in NeoFS EACL filter.

const (
	STRINGEQUAL    MatchType = "STRING_EQUAL"
	STRINGNOTEQUAL MatchType = "STRING_NOT_EQUAL"
)

Defines values for MatchType.

type ObjectBaseInfo

type ObjectBaseInfo struct {
	// Address Address of the object in NeoFS.
	Address  Address `json:"address"`
	FilePath *string `json:"filePath,omitempty"`
	Name     *string `json:"name,omitempty"`
}

ObjectBaseInfo Basic object information.

type ObjectId

type ObjectId = string

ObjectId defines model for objectId.

type ObjectInfo

type ObjectInfo struct {
	Attributes  []Attribute `json:"attributes"`
	ContainerId string      `json:"containerId"`
	ObjectId    string      `json:"objectId"`

	// ObjectSize Object full payload size
	ObjectSize uint64 `json:"objectSize"`
	OwnerId    string `json:"ownerId"`

	// Payload Base64 encoded object payload
	Payload *string `json:"payload,omitempty"`

	// PayloadSize Payload size in response
	PayloadSize int64 `json:"payloadSize"`
}

ObjectInfo Object information.

type ObjectList

type ObjectList struct {
	Objects []ObjectBaseInfo `json:"objects"`
	Size    int              `json:"size"`
}

ObjectList List of objects.

type ObjectUpload

type ObjectUpload struct {
	Attributes  []Attribute `json:"attributes,omitempty"`
	ContainerId string      `json:"containerId"`
	FileName    string      `json:"fileName"`
	Payload     *string     `json:"payload,omitempty"`
}

ObjectUpload <p>Request body to create object.</p> <p>To create an object you must provide <code>containerId</code> and <code>fileName</code>. Additionally, you can provide <code>payload</code> (base64 encoded data) and <code>attributes</code>.</p>

<p>Attribute is key-value data that is stored with the object. Key and value must be in UTF-8 format and must not be empty.</p>

<p>Valid attribute:</p> <ul>

<li><code>MyAttribute: 'some value'</code></li>

</ul>

<p>Invalid attribute:</p> <ul>

<li><code>MyAttribute: ''</code></li>

</ul>

<p>Also, you can use this attribute to further object searching.</p>

type Operation

type Operation string

Operation Request's operation type to match in NeoFS EACL if the rule is applicable to a particular request.

const (
	OperationDELETE    Operation = "DELETE"
	OperationGET       Operation = "GET"
	OperationHEAD      Operation = "HEAD"
	OperationPUT       Operation = "PUT"
	OperationRANGE     Operation = "RANGE"
	OperationRANGEHASH Operation = "RANGEHASH"
	OperationSEARCH    Operation = "SEARCH"
)

Defines values for Operation.

type PutContainerEACLParams

type PutContainerEACLParams struct {
	// WalletConnect Use wallet connect signature scheme or native NeoFS signature.
	WalletConnect *SignatureScheme `form:"walletConnect,omitempty" json:"walletConnect,omitempty"`

	// XBearerSignature Base64 encoded signature for bearer token.
	XBearerSignature *SignatureParam `json:"X-Bearer-Signature,omitempty"`

	// XBearerSignatureKey Hex encoded the public part of the key that signed the bearer token.
	XBearerSignatureKey *SignatureKeyParam `json:"X-Bearer-Signature-Key,omitempty"`
}

PutContainerEACLParams defines parameters for PutContainerEACL.

type PutContainerOK

type PutContainerOK struct {
	ContainerId string `json:"containerId"`
}

PutContainerOK defines model for PutContainerOK.

type PutContainerParams

type PutContainerParams struct {
	// WalletConnect Use wallet connect signature scheme or native NeoFS signature.
	WalletConnect *SignatureScheme `form:"walletConnect,omitempty" json:"walletConnect,omitempty"`

	// NameScopeGlobal Provide this parameter to register container name in NNS service.
	NameScopeGlobal *bool `form:"name-scope-global,omitempty" json:"name-scope-global,omitempty"`

	// XBearerSignature Base64 encoded signature for bearer token.
	XBearerSignature *SignatureParam `json:"X-Bearer-Signature,omitempty"`

	// XBearerSignatureKey Hex encoded the public part of the key that signed the bearer token.
	XBearerSignatureKey *SignatureKeyParam `json:"X-Bearer-Signature-Key,omitempty"`
}

PutContainerParams defines parameters for PutContainer.

type PutObjectJSONRequestBody

type PutObjectJSONRequestBody = ObjectUpload

PutObjectJSONRequestBody defines body for PutObject for application/json ContentType.

type PutObjectParams

type PutObjectParams struct {
	// WalletConnect Use wallet connect signature scheme or native NeoFS signature.
	WalletConnect *SignatureScheme `form:"walletConnect,omitempty" json:"walletConnect,omitempty"`

	// FullBearer Provided bearer token is final or gate should assemble it using signature.
	FullBearer *FullBearerToken `form:"fullBearer,omitempty" json:"fullBearer,omitempty"`

	// XBearerSignature Base64 encoded signature for bearer token.
	XBearerSignature *SignatureParam `json:"X-Bearer-Signature,omitempty"`

	// XBearerSignatureKey Hex encoded the public part of the key that signed the bearer token.
	XBearerSignatureKey *SignatureKeyParam `json:"X-Bearer-Signature-Key,omitempty"`
}

PutObjectParams defines parameters for PutObject.

type Record

type Record struct {
	// Action Rule execution result action in NeoFS EACL. Either allows or denies access if the rule's filters match.
	Action  Action   `json:"action"`
	Filters []Filter `json:"filters"`

	// Operation Request's operation type to match in NeoFS EACL if the rule is applicable to a particular request.
	Operation Operation `json:"operation"`
	Targets   []Target  `json:"targets"`
}

Record A single NeoFS EACL rule.

type Role

type Role string

Role Role for target in EACL.

const (
	KEYS   Role = "KEYS"
	OTHERS Role = "OTHERS"
	SYSTEM Role = "SYSTEM"
	USER   Role = "USER"
)

Defines values for Role.

type Rule

type Rule struct {
	ContainerId *string `json:"containerId,omitempty"`

	// Verb Verb that describes the allowed container operation for token.
	Verb Verb `json:"verb"`
}

Rule Container session token rule.

type SearchFilter

type SearchFilter struct {
	Key string `json:"key"`

	// Match Search match type.
	Match SearchMatch `json:"match"`
	Value string      `json:"value"`
}

SearchFilter Search filter to find objects.

type SearchFilters

type SearchFilters struct {
	Filters []SearchFilter `json:"filters"`
}

SearchFilters List of SearchFilter elements.

type SearchMatch

type SearchMatch string

SearchMatch Search match type.

const (
	MatchCommonPrefix   SearchMatch = "MatchCommonPrefix"
	MatchNotPresent     SearchMatch = "MatchNotPresent"
	MatchStringEqual    SearchMatch = "MatchStringEqual"
	MatchStringNotEqual SearchMatch = "MatchStringNotEqual"
)

Defines values for SearchMatch.

type SearchObjectsParams

type SearchObjectsParams struct {
	// WalletConnect Use wallet connect signature scheme or native NeoFS signature.
	WalletConnect *SignatureScheme `form:"walletConnect,omitempty" json:"walletConnect,omitempty"`

	// FullBearer Provided bearer token is final or gate should assemble it using signature.
	FullBearer *FullBearerToken `form:"fullBearer,omitempty" json:"fullBearer,omitempty"`

	// Offset The number of containers to skip before starting to collect the result set.
	Offset *int `form:"offset,omitempty" json:"offset,omitempty"`

	// Limit The numbers of containers to return.
	Limit *int `form:"limit,omitempty" json:"limit,omitempty"`

	// XBearerSignature Base64 encoded signature for bearer token.
	XBearerSignature *SignatureParam `json:"X-Bearer-Signature,omitempty"`

	// XBearerSignatureKey Hex encoded the public part of the key that signed the bearer token.
	XBearerSignatureKey *SignatureKeyParam `json:"X-Bearer-Signature-Key,omitempty"`
}

SearchObjectsParams defines parameters for SearchObjects.

type ServerInterface

type ServerInterface interface {
	// Get balance in NeoFS
	// (GET /accounting/balance/{address})
	GetBalance(ctx echo.Context, address string) error

	// (OPTIONS /accounting/balance/{address})
	OptionsBalance(ctx echo.Context, address string) error

	// (OPTIONS /auth)
	OptionsAuth(ctx echo.Context) error
	// Form bearer token to further requests
	// (POST /auth)
	Auth(ctx echo.Context, params AuthParams) error
	// Form binary bearer token
	// (GET /auth/bearer)
	FormBinaryBearer(ctx echo.Context, params FormBinaryBearerParams) error

	// (OPTIONS /auth/bearer)
	OptionsAuthBearer(ctx echo.Context) error
	// Get list of containers
	// (GET /containers)
	ListContainers(ctx echo.Context, params ListContainersParams) error

	// (OPTIONS /containers)
	OptionsContainersPutList(ctx echo.Context) error
	// Create new container in NeoFS
	// (PUT /containers)
	PutContainer(ctx echo.Context, params PutContainerParams) error
	// Delete container by id
	// (DELETE /containers/{containerId})
	DeleteContainer(ctx echo.Context, containerId ContainerId, params DeleteContainerParams) error
	// Get container by id
	// (GET /containers/{containerId})
	GetContainer(ctx echo.Context, containerId ContainerId) error

	// (OPTIONS /containers/{containerId})
	OptionsContainersGetDelete(ctx echo.Context, containerId ContainerId) error
	// Get container EACL by id
	// (GET /containers/{containerId}/eacl)
	GetContainerEACL(ctx echo.Context, containerId ContainerId) error

	// (OPTIONS /containers/{containerId}/eacl)
	OptionsContainersEACL(ctx echo.Context, containerId ContainerId) error
	// Set container EACL by id
	// (PUT /containers/{containerId}/eacl)
	PutContainerEACL(ctx echo.Context, containerId ContainerId, params PutContainerEACLParams) error
	// Get object by container ID and object ID. Also returns custom users' header attributes `X-Attribute-*`. It returns the MIME type based on headers or object contents, so the actual Content-Type can differ from the list in the "Response content type" section.
	// (GET /get/{containerId}/{objectId})
	GetContainerObject(ctx echo.Context, containerId ContainerId, objectId ObjectId, params GetContainerObjectParams) error
	// Get object info (head) by container ID and object ID. Also returns custom users' header attributes `X-Attribute-*`.
	// (HEAD /get/{containerId}/{objectId})
	HeadContainerObject(ctx echo.Context, containerId ContainerId, objectId ObjectId, params HeadContainerObjectParams) error

	// (OPTIONS /get/{containerId}/{objectId})
	OptionsContainerObject(ctx echo.Context, containerId ContainerId, objectId ObjectId) error
	// Find and get an object (payload and attributes) by a specific attribute. If more than one object is found, an arbitrary one will be returned. It returns the MIME type based on headers or object contents, so the actual Content-Type can differ from the list in the "Response content type" section.
	// (GET /get_by_attribute/{containerId}/{attrKey}/{attrVal})
	GetByAttribute(ctx echo.Context, containerId ContainerId, attrKey AttrKey, attrVal AttrVal, params GetByAttributeParams) error
	// Get object attributes by a specific attribute. If more than one object is found, an arbitrary one will be used to get attributes.
	// (HEAD /get_by_attribute/{containerId}/{attrKey}/{attrVal})
	HeadByAttribute(ctx echo.Context, containerId ContainerId, attrKey AttrKey, attrVal AttrVal, params HeadByAttributeParams) error

	// (OPTIONS /get_by_attribute/{containerId}/{attrKey}/{attrVal})
	OptionsByAttribute(ctx echo.Context, containerId ContainerId, attrKey AttrKey, attrVal AttrVal) error

	// (OPTIONS /objects)
	OptionsObjectsPut(ctx echo.Context) error
	// Upload object to NeoFS
	// (PUT /objects)
	PutObject(ctx echo.Context, params PutObjectParams) error

	// (OPTIONS /objects/{containerId}/search)
	OptionsObjectsSearch(ctx echo.Context, containerId string) error
	// Search objects by filters
	// (POST /objects/{containerId}/search)
	SearchObjects(ctx echo.Context, containerId ContainerId, params SearchObjectsParams) error
	// Remove object from NeoFS
	// (DELETE /objects/{containerId}/{objectId})
	DeleteObject(ctx echo.Context, containerId ContainerId, objectId ObjectId, params DeleteObjectParams) error
	// Get object info by address
	// (GET /objects/{containerId}/{objectId})
	GetObjectInfo(ctx echo.Context, containerId ContainerId, objectId ObjectId, params GetObjectInfoParams) error

	// (OPTIONS /objects/{containerId}/{objectId})
	OptionsObjectsGetDelete(ctx echo.Context, containerId ContainerId, objectId ObjectId) error

	// (OPTIONS /upload/{containerId})
	OptionsUploadContainerObject(ctx echo.Context, containerId ContainerId) error
	// Upload object to NeoFS
	// (POST /upload/{containerId})
	UploadContainerObject(ctx echo.Context, containerId ContainerId, params UploadContainerObjectParams) error
}

ServerInterface represents all server handlers.

type ServerInterfaceWrapper

type ServerInterfaceWrapper struct {
	Handler ServerInterface
}

ServerInterfaceWrapper converts echo contexts to parameters.

func (*ServerInterfaceWrapper) Auth

func (w *ServerInterfaceWrapper) Auth(ctx echo.Context) error

Auth converts echo context to params.

func (*ServerInterfaceWrapper) DeleteContainer

func (w *ServerInterfaceWrapper) DeleteContainer(ctx echo.Context) error

DeleteContainer converts echo context to params.

func (*ServerInterfaceWrapper) DeleteObject

func (w *ServerInterfaceWrapper) DeleteObject(ctx echo.Context) error

DeleteObject converts echo context to params.

func (*ServerInterfaceWrapper) FormBinaryBearer

func (w *ServerInterfaceWrapper) FormBinaryBearer(ctx echo.Context) error

FormBinaryBearer converts echo context to params.

func (*ServerInterfaceWrapper) GetBalance

func (w *ServerInterfaceWrapper) GetBalance(ctx echo.Context) error

GetBalance converts echo context to params.

func (*ServerInterfaceWrapper) GetByAttribute

func (w *ServerInterfaceWrapper) GetByAttribute(ctx echo.Context) error

GetByAttribute converts echo context to params.

func (*ServerInterfaceWrapper) GetContainer

func (w *ServerInterfaceWrapper) GetContainer(ctx echo.Context) error

GetContainer converts echo context to params.

func (*ServerInterfaceWrapper) GetContainerEACL

func (w *ServerInterfaceWrapper) GetContainerEACL(ctx echo.Context) error

GetContainerEACL converts echo context to params.

func (*ServerInterfaceWrapper) GetContainerObject

func (w *ServerInterfaceWrapper) GetContainerObject(ctx echo.Context) error

GetContainerObject converts echo context to params.

func (*ServerInterfaceWrapper) GetObjectInfo

func (w *ServerInterfaceWrapper) GetObjectInfo(ctx echo.Context) error

GetObjectInfo converts echo context to params.

func (*ServerInterfaceWrapper) HeadByAttribute

func (w *ServerInterfaceWrapper) HeadByAttribute(ctx echo.Context) error

HeadByAttribute converts echo context to params.

func (*ServerInterfaceWrapper) HeadContainerObject

func (w *ServerInterfaceWrapper) HeadContainerObject(ctx echo.Context) error

HeadContainerObject converts echo context to params.

func (*ServerInterfaceWrapper) ListContainers

func (w *ServerInterfaceWrapper) ListContainers(ctx echo.Context) error

ListContainers converts echo context to params.

func (*ServerInterfaceWrapper) OptionsAuth

func (w *ServerInterfaceWrapper) OptionsAuth(ctx echo.Context) error

OptionsAuth converts echo context to params.

func (*ServerInterfaceWrapper) OptionsAuthBearer

func (w *ServerInterfaceWrapper) OptionsAuthBearer(ctx echo.Context) error

OptionsAuthBearer converts echo context to params.

func (*ServerInterfaceWrapper) OptionsBalance

func (w *ServerInterfaceWrapper) OptionsBalance(ctx echo.Context) error

OptionsBalance converts echo context to params.

func (*ServerInterfaceWrapper) OptionsByAttribute

func (w *ServerInterfaceWrapper) OptionsByAttribute(ctx echo.Context) error

OptionsByAttribute converts echo context to params.

func (*ServerInterfaceWrapper) OptionsContainerObject

func (w *ServerInterfaceWrapper) OptionsContainerObject(ctx echo.Context) error

OptionsContainerObject converts echo context to params.

func (*ServerInterfaceWrapper) OptionsContainersEACL

func (w *ServerInterfaceWrapper) OptionsContainersEACL(ctx echo.Context) error

OptionsContainersEACL converts echo context to params.

func (*ServerInterfaceWrapper) OptionsContainersGetDelete

func (w *ServerInterfaceWrapper) OptionsContainersGetDelete(ctx echo.Context) error

OptionsContainersGetDelete converts echo context to params.

func (*ServerInterfaceWrapper) OptionsContainersPutList

func (w *ServerInterfaceWrapper) OptionsContainersPutList(ctx echo.Context) error

OptionsContainersPutList converts echo context to params.

func (*ServerInterfaceWrapper) OptionsObjectsGetDelete

func (w *ServerInterfaceWrapper) OptionsObjectsGetDelete(ctx echo.Context) error

OptionsObjectsGetDelete converts echo context to params.

func (*ServerInterfaceWrapper) OptionsObjectsPut

func (w *ServerInterfaceWrapper) OptionsObjectsPut(ctx echo.Context) error

OptionsObjectsPut converts echo context to params.

func (*ServerInterfaceWrapper) OptionsObjectsSearch

func (w *ServerInterfaceWrapper) OptionsObjectsSearch(ctx echo.Context) error

OptionsObjectsSearch converts echo context to params.

func (*ServerInterfaceWrapper) OptionsUploadContainerObject

func (w *ServerInterfaceWrapper) OptionsUploadContainerObject(ctx echo.Context) error

OptionsUploadContainerObject converts echo context to params.

func (*ServerInterfaceWrapper) PutContainer

func (w *ServerInterfaceWrapper) PutContainer(ctx echo.Context) error

PutContainer converts echo context to params.

func (*ServerInterfaceWrapper) PutContainerEACL

func (w *ServerInterfaceWrapper) PutContainerEACL(ctx echo.Context) error

PutContainerEACL converts echo context to params.

func (*ServerInterfaceWrapper) PutObject

func (w *ServerInterfaceWrapper) PutObject(ctx echo.Context) error

PutObject converts echo context to params.

func (*ServerInterfaceWrapper) SearchObjects

func (w *ServerInterfaceWrapper) SearchObjects(ctx echo.Context) error

SearchObjects converts echo context to params.

func (*ServerInterfaceWrapper) UploadContainerObject

func (w *ServerInterfaceWrapper) UploadContainerObject(ctx echo.Context) error

UploadContainerObject converts echo context to params.

type SignatureKeyParam

type SignatureKeyParam = string

SignatureKeyParam defines model for signatureKeyParam.

type SignatureParam

type SignatureParam = string

SignatureParam defines model for signatureParam.

type SignatureScheme

type SignatureScheme = bool

SignatureScheme defines model for signatureScheme.

type SuccessResponse

type SuccessResponse struct {
	Success bool `json:"success"`
}

SuccessResponse Success response.

type Target

type Target struct {
	Keys []string `json:"keys"`

	// Role Role for target in EACL.
	Role Role `json:"role"`
}

Target Target to apply the ACL rule. Can be a subject's role class or a list of public keys to match (KEYS role).

type TokenResponse

type TokenResponse struct {
	Name  *string `json:"name,omitempty"`
	Token string  `json:"token"`

	// Type Type of token.
	Type TokenType `json:"type"`
}

TokenResponse Base64 encoded marshaled token (for container or for object operations).

type TokenType

type TokenType string

TokenType Type of token.

const (
	Container TokenType = "container"
	Object    TokenType = "object"
)

Defines values for TokenType.

type UploadContainerObjectMultipartBody

type UploadContainerObjectMultipartBody struct {
	// Payload The file to upload.  If no file is present in this field, any other field name will be accepted, except for an empty one.
	Payload *openapi_types.File `json:"payload,omitempty"`
}

UploadContainerObjectMultipartBody defines parameters for UploadContainerObject.

type UploadContainerObjectMultipartRequestBody

type UploadContainerObjectMultipartRequestBody UploadContainerObjectMultipartBody

UploadContainerObjectMultipartRequestBody defines body for UploadContainerObject for multipart/form-data ContentType.

type UploadContainerObjectParams

type UploadContainerObjectParams struct {
	// XAttributeFilename This attribute, in any combination of upper/lower case, will be added to the object as the `FileName` attribute. It will also be returned as the `FileName` attribute in GET/HEAD API calls for the object (/get/{containerId}/{objectId}) and the `name` in POST call search in a container (/objects/{containerId}/search).
	XAttributeFilename *string `json:"X-Attribute-Filename,omitempty"`

	// XAttributeFilepath This attribute, in any combination of upper/lower case, will be added to the object as the `FilePath` attribute. It will also be returned as the `FilePath` attribute in GET/HEAD API calls for the object (/get/{containerId}/{objectId}) or the `filePath` in POST call search in a container (/objects/{containerId}/search).
	XAttributeFilepath *string `json:"X-Attribute-Filepath,omitempty"`
}

UploadContainerObjectParams defines parameters for UploadContainerObject.

type Verb

type Verb string

Verb Verb that describes the allowed container operation for token.

const (
	VerbDELETE  Verb = "DELETE"
	VerbPUT     Verb = "PUT"
	VerbSETEACL Verb = "SETEACL"
)

Defines values for Verb.

Jump to

Keyboard shortcuts

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