status

package
v0.0.0-...-6458c11 Latest Latest
Warning

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

Go to latest
Published: Apr 4, 2025 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	Section_name = map[int32]string{
		0: "SECTION_SUCCESS",
		1: "SECTION_FAILURE_COMMON",
		2: "SECTION_OBJECT",
		3: "SECTION_CONTAINER",
		4: "SECTION_SESSION",
		5: "SECTION_APE_MANAGER",
	}
	Section_value = map[string]int32{
		"SECTION_SUCCESS":        0,
		"SECTION_FAILURE_COMMON": 1,
		"SECTION_OBJECT":         2,
		"SECTION_CONTAINER":      3,
		"SECTION_SESSION":        4,
		"SECTION_APE_MANAGER":    5,
	}
)

Enum value maps for Section.

View Source
var (
	Success_name = map[int32]string{
		0: "OK",
	}
	Success_value = map[string]int32{
		"OK": 0,
	}
)

Enum value maps for Success.

View Source
var (
	CommonFail_name = map[int32]string{
		0: "INTERNAL",
		1: "WRONG_MAGIC_NUMBER",
		2: "SIGNATURE_VERIFICATION_FAIL",
		3: "NODE_UNDER_MAINTENANCE",
		4: "INVALID_ARGUMENT",
		5: "RESOURCE_EXHAUSTED",
	}
	CommonFail_value = map[string]int32{
		"INTERNAL":                    0,
		"WRONG_MAGIC_NUMBER":          1,
		"SIGNATURE_VERIFICATION_FAIL": 2,
		"NODE_UNDER_MAINTENANCE":      3,
		"INVALID_ARGUMENT":            4,
		"RESOURCE_EXHAUSTED":          5,
	}
)

Enum value maps for CommonFail.

View Source
var (
	Object_name = map[int32]string{
		0: "ACCESS_DENIED",
		1: "OBJECT_NOT_FOUND",
		2: "LOCKED",
		3: "LOCK_NON_REGULAR_OBJECT",
		4: "OBJECT_ALREADY_REMOVED",
		5: "OUT_OF_RANGE",
	}
	Object_value = map[string]int32{
		"ACCESS_DENIED":           0,
		"OBJECT_NOT_FOUND":        1,
		"LOCKED":                  2,
		"LOCK_NON_REGULAR_OBJECT": 3,
		"OBJECT_ALREADY_REMOVED":  4,
		"OUT_OF_RANGE":            5,
	}
)

Enum value maps for Object.

View Source
var (
	Container_name = map[int32]string{
		0: "CONTAINER_NOT_FOUND",
		1: "EACL_NOT_FOUND",
		2: "CONTAINER_ACCESS_DENIED",
	}
	Container_value = map[string]int32{
		"CONTAINER_NOT_FOUND":     0,
		"EACL_NOT_FOUND":          1,
		"CONTAINER_ACCESS_DENIED": 2,
	}
)

Enum value maps for Container.

View Source
var (
	Session_name = map[int32]string{
		0: "TOKEN_NOT_FOUND",
		1: "TOKEN_EXPIRED",
	}
	Session_value = map[string]int32{
		"TOKEN_NOT_FOUND": 0,
		"TOKEN_EXPIRED":   1,
	}
)

Enum value maps for Session.

View Source
var (
	APEManager_name = map[int32]string{
		0: "APE_MANAGER_ACCESS_DENIED",
	}
	APEManager_value = map[string]int32{
		"APE_MANAGER_ACCESS_DENIED": 0,
	}
)

Enum value maps for APEManager.

View Source
var File_api_status_grpc_types_proto protoreflect.FileDescriptor

Functions

This section is empty.

Types

type APEManager

type APEManager int32

Section of status for APE manager related operations.

const (
	// [**5120**] The operation is denied by APE manager.
	APEManager_APE_MANAGER_ACCESS_DENIED APEManager = 0
)

func (APEManager) Descriptor

func (APEManager) Descriptor() protoreflect.EnumDescriptor

func (APEManager) Enum

func (x APEManager) Enum() *APEManager

func (APEManager) Number

func (x APEManager) Number() protoreflect.EnumNumber

func (APEManager) String

func (x APEManager) String() string

func (APEManager) Type

type CommonFail

type CommonFail int32

Section of failed statuses independent of the operation.

const (
	// [**1024**] Internal server error, default failure. Not detailed.
	// If the server cannot match failed outcome to the code, it should
	// use this code.
	CommonFail_INTERNAL CommonFail = 0
	// [**1025**] Wrong magic of the FrostFS network.
	// Details:
	//   - [**0**] Magic number of the served FrostFS network (big-endian 64-bit
	//     unsigned integer).
	CommonFail_WRONG_MAGIC_NUMBER CommonFail = 1
	// [**1026**] Signature verification failure.
	CommonFail_SIGNATURE_VERIFICATION_FAIL CommonFail = 2
	// [**1027**] Node is under maintenance.
	CommonFail_NODE_UNDER_MAINTENANCE CommonFail = 3
	// [**1028**] Invalid argument error. If the server fails on validation of a
	// request parameter as the client sent it incorrectly, then this code should
	// be used.
	CommonFail_INVALID_ARGUMENT CommonFail = 4
	// [**1029**] Resource exhausted failure. If the operation cannot be performed
	// due to a lack of resources.
	CommonFail_RESOURCE_EXHAUSTED CommonFail = 5
)

func (CommonFail) Descriptor

func (CommonFail) Descriptor() protoreflect.EnumDescriptor

func (CommonFail) Enum

func (x CommonFail) Enum() *CommonFail

func (CommonFail) Number

func (x CommonFail) Number() protoreflect.EnumNumber

func (CommonFail) String

func (x CommonFail) String() string

func (CommonFail) Type

type Container

type Container int32

Section of statuses for container-related operations.

const (
	// [**3072**] Container not found.
	Container_CONTAINER_NOT_FOUND Container = 0
	// [**3073**] eACL table not found.
	Container_EACL_NOT_FOUND Container = 1
	// [**3074**] Container access denied.
	Container_CONTAINER_ACCESS_DENIED Container = 2
)

func (Container) Descriptor

func (Container) Descriptor() protoreflect.EnumDescriptor

func (Container) Enum

func (x Container) Enum() *Container

func (Container) Number

func (x Container) Number() protoreflect.EnumNumber

func (Container) String

func (x Container) String() string

func (Container) Type

type Object

type Object int32

Section of statuses for object-related operations.

const (
	// [**2048**] Access denied by ACL.
	// Details:
	// - [**0**] Human-readable description (UTF-8 encoded string).
	Object_ACCESS_DENIED Object = 0
	// [**2049**] Object not found.
	Object_OBJECT_NOT_FOUND Object = 1
	// [**2050**] Operation rejected by the object lock.
	Object_LOCKED Object = 2
	// [**2051**] Locking an object with a non-REGULAR type rejected.
	Object_LOCK_NON_REGULAR_OBJECT Object = 3
	// [**2052**] Object has been marked deleted.
	Object_OBJECT_ALREADY_REMOVED Object = 4
	// [**2053**] Invalid range has been requested for an object.
	Object_OUT_OF_RANGE Object = 5
)

func (Object) Descriptor

func (Object) Descriptor() protoreflect.EnumDescriptor

func (Object) Enum

func (x Object) Enum() *Object

func (Object) Number

func (x Object) Number() protoreflect.EnumNumber

func (Object) String

func (x Object) String() string

func (Object) Type

func (Object) Type() protoreflect.EnumType

type Section

type Section int32

Section identifiers.

const (
	// Successful return codes.
	Section_SECTION_SUCCESS Section = 0
	// Failure codes regardless of the operation.
	Section_SECTION_FAILURE_COMMON Section = 1
	// Object service-specific errors.
	Section_SECTION_OBJECT Section = 2
	// Container service-specific errors.
	Section_SECTION_CONTAINER Section = 3
	// Session service-specific errors.
	Section_SECTION_SESSION Section = 4
	// Session service-specific errors.
	Section_SECTION_APE_MANAGER Section = 5
)

func (Section) Descriptor

func (Section) Descriptor() protoreflect.EnumDescriptor

func (Section) Enum

func (x Section) Enum() *Section

func (Section) Number

func (x Section) Number() protoreflect.EnumNumber

func (Section) String

func (x Section) String() string

func (Section) Type

func (Section) Type() protoreflect.EnumType

type Session

type Session int32

Section of statuses for session-related operations.

const (
	// [**4096**] Token not found.
	Session_TOKEN_NOT_FOUND Session = 0
	// [**4097**] Token has expired.
	Session_TOKEN_EXPIRED Session = 1
)

func (Session) Descriptor

func (Session) Descriptor() protoreflect.EnumDescriptor

func (Session) Enum

func (x Session) Enum() *Session

func (Session) Number

func (x Session) Number() protoreflect.EnumNumber

func (Session) String

func (x Session) String() string

func (Session) Type

func (Session) Type() protoreflect.EnumType

type Status

type Status struct {

	// The status code
	Code *uint32 `protobuf:"varint,1,opt,name=code" json:"code,omitempty"`
	// Developer-facing error message
	Message *string `protobuf:"bytes,2,opt,name=message" json:"message,omitempty"`
	// Data detailing the outcome of the operation. Must be unique by ID.
	Details []*Status_Detail `protobuf:"bytes,3,rep,name=details" json:"details,omitempty"`
	// contains filtered or unexported fields
}

Declares the general format of the status returns of the FrostFS RPC protocol. Status is present in all response messages. Each RPC of FrostFS protocol describes the possible outcomes and details of the operation.

Each status is assigned a one-to-one numeric code. Any unique result of an operation in FrostFS is unambiguously associated with the code value.

Numerical set of codes is split into 1024-element sections. An enumeration is defined for each section. Values can be referred to in the following ways:

* numerical value ranging from 0 to 4,294,967,295 (global code);

  • values from enumeration (local code). The formula for the ratio of the local code (`L`) of a defined section (`S`) to the global one (`G`): `G = 1024 * S + L`.

All outcomes are divided into successful and failed, which corresponds to the success or failure of the operation. The definition of success follows the semantics of RPC and the description of its purpose. The server must not attach code that is the opposite of the outcome type.

See the set of return codes in the description for calls.

Each status can carry a developer-facing error message. It should be a human readable text in English. The server should not transmit (and the client should not expect) useful information in the message. Field `details` should make the return more detailed.

func (*Status) ClearCode

func (x *Status) ClearCode()

func (*Status) ClearMessage

func (x *Status) ClearMessage()

func (*Status) GetCode

func (x *Status) GetCode() uint32

func (*Status) GetDetails

func (x *Status) GetDetails() []*Status_Detail

func (*Status) GetMessage

func (x *Status) GetMessage() string

func (*Status) HasCode

func (x *Status) HasCode() bool

func (*Status) HasMessage

func (x *Status) HasMessage() bool

func (*Status) ProtoMessage

func (*Status) ProtoMessage()

func (*Status) ProtoReflect

func (x *Status) ProtoReflect() protoreflect.Message

func (*Status) Reset

func (x *Status) Reset()

func (*Status) SetCode

func (x *Status) SetCode(v uint32)

func (*Status) SetDetails

func (x *Status) SetDetails(v []*Status_Detail)

func (*Status) SetMessage

func (x *Status) SetMessage(v string)

func (*Status) String

func (x *Status) String() string

type Status_Detail

type Status_Detail struct {

	// Detail ID. The identifier is required to determine the binary format
	// of the detail and how to decode it.
	Id *uint32 `protobuf:"varint,1,opt,name=id" json:"id,omitempty"`
	// Binary status detail. Must follow the format associated with ID.
	// The possibility of missing a value must be explicitly allowed.
	Value []byte `protobuf:"bytes,2,opt,name=value" json:"value,omitempty"`
	// contains filtered or unexported fields
}

Return detail. It contains additional information that can be used to analyze the response. Each code defines a set of details that can be attached to a status. Client should not handle details that are not covered by the code.

func (*Status_Detail) ClearId

func (x *Status_Detail) ClearId()

func (*Status_Detail) ClearValue

func (x *Status_Detail) ClearValue()

func (*Status_Detail) GetId

func (x *Status_Detail) GetId() uint32

func (*Status_Detail) GetValue

func (x *Status_Detail) GetValue() []byte

func (*Status_Detail) HasId

func (x *Status_Detail) HasId() bool

func (*Status_Detail) HasValue

func (x *Status_Detail) HasValue() bool

func (*Status_Detail) ProtoMessage

func (*Status_Detail) ProtoMessage()

func (*Status_Detail) ProtoReflect

func (x *Status_Detail) ProtoReflect() protoreflect.Message

func (*Status_Detail) Reset

func (x *Status_Detail) Reset()

func (*Status_Detail) SetId

func (x *Status_Detail) SetId(v uint32)

func (*Status_Detail) SetValue

func (x *Status_Detail) SetValue(v []byte)

func (*Status_Detail) String

func (x *Status_Detail) String() string

type Status_Detail_builder

type Status_Detail_builder struct {

	// Detail ID. The identifier is required to determine the binary format
	// of the detail and how to decode it.
	Id *uint32
	// Binary status detail. Must follow the format associated with ID.
	// The possibility of missing a value must be explicitly allowed.
	Value []byte
	// contains filtered or unexported fields
}

func (Status_Detail_builder) Build

type Status_builder

type Status_builder struct {

	// The status code
	Code *uint32
	// Developer-facing error message
	Message *string
	// Data detailing the outcome of the operation. Must be unique by ID.
	Details []*Status_Detail
	// contains filtered or unexported fields
}

func (Status_builder) Build

func (b0 Status_builder) Build() *Status

type Success

type Success int32

Section of FrostFS successful return codes.

const (
	// [**0**] Default success. Not detailed.
	// If the server cannot match successful outcome to the code, it should
	// use this code.
	Success_OK Success = 0
)

func (Success) Descriptor

func (Success) Descriptor() protoreflect.EnumDescriptor

func (Success) Enum

func (x Success) Enum() *Success

func (Success) Number

func (x Success) Number() protoreflect.EnumNumber

func (Success) String

func (x Success) String() string

func (Success) Type

func (Success) Type() protoreflect.EnumType

Jump to

Keyboard shortcuts

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