commonv1

package
v1.36.1-20240723225114... Latest Latest
Warning

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

Go to latest
Published: unknown License: BSD-3-Clause Imports: 3 Imported by: 2

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	Exception_Type_name = map[int32]string{
		0: "INVALID_TYPE",
		1: "BUSINESS",
		2: "SERVICE_NOT_AVAILABLE",
		3: "INFRASTRUCTURE",
		4: "UNEXPECTED",
		5: "SECURITY_VIOLATION",
	}
	Exception_Type_value = map[string]int32{
		"INVALID_TYPE":          0,
		"BUSINESS":              1,
		"SERVICE_NOT_AVAILABLE": 2,
		"INFRASTRUCTURE":        3,
		"UNEXPECTED":            4,
		"SECURITY_VIOLATION":    5,
	}
)

Enum value maps for Exception_Type.

View Source
var File_common_v1_exception_proto protoreflect.FileDescriptor

Functions

This section is empty.

Types

type Exception

type Exception struct {

	// UUID for exception.
	Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"`
	// Type of exception.
	Type Exception_Type `protobuf:"varint,2,opt,name=type,proto3,enum=common.v1.Exception_Type" json:"type,omitempty"`
	// Timestamp for when the exception occurred (RFC3339).
	Timestamp string `protobuf:"bytes,3,opt,name=timestamp,proto3" json:"timestamp,omitempty"`
	// Human readable description of exception.
	Description string `protobuf:"bytes,4,opt,name=description,proto3" json:"description,omitempty"`
	// Additional metadata about the exception.
	ExceptionMetadata map[string]string `` /* 186-byte string literal not displayed */
	// contains filtered or unexported fields
}

General message for exceptions.

func (*Exception) GetDescription

func (x *Exception) GetDescription() string

func (*Exception) GetExceptionMetadata

func (x *Exception) GetExceptionMetadata() map[string]string

func (*Exception) GetId

func (x *Exception) GetId() string

func (*Exception) GetTimestamp

func (x *Exception) GetTimestamp() string

func (*Exception) GetType

func (x *Exception) GetType() Exception_Type

func (*Exception) ProtoMessage

func (*Exception) ProtoMessage()

func (*Exception) ProtoReflect

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

func (*Exception) Reset

func (x *Exception) Reset()

func (*Exception) SetDescription

func (x *Exception) SetDescription(v string)

func (*Exception) SetExceptionMetadata

func (x *Exception) SetExceptionMetadata(v map[string]string)

func (*Exception) SetId

func (x *Exception) SetId(v string)

func (*Exception) SetTimestamp

func (x *Exception) SetTimestamp(v string)

func (*Exception) SetType

func (x *Exception) SetType(v Exception_Type)

func (*Exception) String

func (x *Exception) String() string

type ExceptionResponse

type ExceptionResponse struct {

	// An exception if an error occurred during processing request.
	Exception *Exception `protobuf:"bytes,1,opt,name=exception,proto3" json:"exception,omitempty"`
	// contains filtered or unexported fields
}

Exception messages.

func (*ExceptionResponse) ClearException

func (x *ExceptionResponse) ClearException()

func (*ExceptionResponse) GetException

func (x *ExceptionResponse) GetException() *Exception

func (*ExceptionResponse) HasException

func (x *ExceptionResponse) HasException() bool

func (*ExceptionResponse) ProtoMessage

func (*ExceptionResponse) ProtoMessage()

func (*ExceptionResponse) ProtoReflect

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

func (*ExceptionResponse) Reset

func (x *ExceptionResponse) Reset()

func (*ExceptionResponse) SetException

func (x *ExceptionResponse) SetException(v *Exception)

func (*ExceptionResponse) String

func (x *ExceptionResponse) String() string

type ExceptionResponse_builder

type ExceptionResponse_builder struct {

	// An exception if an error occurred during processing request.
	Exception *Exception
	// contains filtered or unexported fields
}

func (ExceptionResponse_builder) Build

type Exception_Type

type Exception_Type int32

Type of exception.

const (
	// Default for no exception.
	Exception_INVALID_TYPE Exception_Type = 0
	// Business logic error.
	Exception_BUSINESS Exception_Type = 1
	// A service was unavailable.
	Exception_SERVICE_NOT_AVAILABLE Exception_Type = 2
	// Infrastructure was down.
	Exception_INFRASTRUCTURE Exception_Type = 3
	// Catch-all for all other types.
	Exception_UNEXPECTED Exception_Type = 4
	// Security related error.
	Exception_SECURITY_VIOLATION Exception_Type = 5
)

func (Exception_Type) Descriptor

func (Exception_Type) Enum

func (x Exception_Type) Enum() *Exception_Type

func (Exception_Type) Number

func (Exception_Type) String

func (x Exception_Type) String() string

func (Exception_Type) Type

type Exception_builder

type Exception_builder struct {

	// UUID for exception.
	Id string
	// Type of exception.
	Type Exception_Type
	// Timestamp for when the exception occurred (RFC3339).
	Timestamp string
	// Human readable description of exception.
	Description string
	// Additional metadata about the exception.
	ExceptionMetadata map[string]string
	// contains filtered or unexported fields
}

func (Exception_builder) Build

func (b0 Exception_builder) Build() *Exception

Jump to

Keyboard shortcuts

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