v1

package
v0.89.1 Latest Latest
Warning

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

Go to latest
Published: Dec 8, 2024 License: Apache-2.0 Imports: 9 Imported by: 20

Documentation

Overview

Package v1 contains the common types used in API of ArangoDB Managed Service

Index

Constants

View Source
const (
	// DeploymentLowerPort is the lower port number for the deployment, used with well-known certificates
	DeploymentLowerPort = 8529
	// DeploymentHigherPort is the higher port number for the deployment, used with self-signed certificates
	DeploymentHigherPort = 18529
	// ExternalServicesLowerPort is the lower port number for the external services, used with well-known certificates
	ExternalServicesLowerPort = 8829
	// ExternalServicesHigherPort is the higher port number for the external services, used with self-signed certificates
	ExternalServicesHigherPort = 18829
)
View Source
const (
	// DefaultPageSize is the default number of items per List request.
	DefaultPageSize = 50
)

Variables

View Source
var File_common_proto protoreflect.FileDescriptor

Functions

func Aborted added in v0.45.4

func Aborted(msg string, args ...interface{}) error

Aborted creates a new error that signals that an operation was aborted.

func AlreadyExists

func AlreadyExists(msg string, args ...interface{}) error

AlreadyExists creates a new error that signals a request to create an object that already exists.

func Canceled

func Canceled(msg string, args ...interface{}) error

Canceled creates a new error that signals a request that was canceled. Typically by the caller.

func Cause

func Cause(err error) error

Cause is the cause function used by the error helpers in this module.

func CloneDuration

func CloneDuration(s *durationpb.Duration) *durationpb.Duration

CloneDuration creates a deep copy of the given duration

func CloneTimestamp

func CloneTimestamp(s *timestamppb.Timestamp) *timestamppb.Timestamp

CloneTimestamp creates a deep clone of the given timestamp

func CommonError added in v0.70.9

func CommonError(err error) error

CommonError extracts common error from given error and returns it If the given err is nil it returns nil also If the given err Cause is not any of known common errors it return Unknown error

func CompareDurations added in v0.89.1

func CompareDurations(d1, d2 *durationpb.Duration) int

Compare compares two durationpb.Duration instances. Returns 0 if d1 == d2, 1 if d1 > d2, and -1 if d1 < d2.

func CompareTimestamps added in v0.89.0

func CompareTimestamps(ts1, ts2 *timestamppb.Timestamp) int

CompareTimestamps compares two *timestamppb.Timestamp instances. Returns -1 if ts1 < ts2, 1 if ts1 > ts2, and 0 if they are equal.

func DeadlineExceeded

func DeadlineExceeded(msg string, args ...interface{}) error

DeadlineExceeded creates a new error that signals a request that timed out.

func DurationsEqual added in v0.89.0

func DurationsEqual(d1, d2 *durationpb.Duration) bool

DurationsEqual compares two *durationpb.Duration instances for equality.

func InvalidArgument

func InvalidArgument(msg string, args ...interface{}) error

InvalidArgument creates a new error that signals a request with invalid arguments.

func IsAborted added in v0.45.4

func IsAborted(err error) bool

IsAborted returns true if the given error signals that the operation was aborted.

func IsAlreadyExists

func IsAlreadyExists(err error) bool

IsAlreadyExists returns true if the given error signals a request to create an object that already exists.

func IsCanceled

func IsCanceled(err error) bool

IsCanceled returns true if the given error signals a request that was canceled. Typically by the caller.

func IsDeadlineExceeded

func IsDeadlineExceeded(err error) bool

IsDeadlineExceeded returns true if the given error signals a request that timed out.

func IsInvalidArgument

func IsInvalidArgument(err error) bool

IsInvalidArgument returns true if the given error signals a request with invalid arguments.

func IsNotFound

func IsNotFound(err error) bool

IsNotFound returns true if the given error signals a request to an object that is not found.

func IsPermissionDenied

func IsPermissionDenied(err error) bool

IsPermissionDenied returns true if the given error signals a request that the caller has not enough permissions for.

func IsPreconditionFailed

func IsPreconditionFailed(err error) bool

IsPreconditionFailed returns true if the given error signals a precondition of the request has failed.

func IsResourceExhausted added in v0.45.3

func IsResourceExhausted(err error) bool

IsResourceExhausted returns true if the given error signals a request that failed because of lack of resources, e.g. user quotas.

func IsUnauthenticated

func IsUnauthenticated(err error) bool

IsUnauthenticated returns true if the given error signals an unauthenticated request.

func IsUnavailable added in v0.45.4

func IsUnavailable(err error) bool

IsUnavailable returns true if the given error signals an unavailable error. This is a most likely a transient condition and may be corrected by retrying with a backoff. Note that it is not always safe to retry non-idempotent operations.

func IsUnknown

func IsUnknown(err error) bool

IsUnknown returns true if the given error signals an unknown error.

func NotFound

func NotFound(msg string, args ...interface{}) error

NotFound creates a new error that signals a request to an object that is not found.

func PermissionDenied

func PermissionDenied(msg string, args ...interface{}) error

PermissionDenied creates a new error that signals a request that the caller has not enough permissions for.

func PreconditionFailed

func PreconditionFailed(msg string, args ...interface{}) error

PreconditionFailed creates a new error that signals a request that a precondition of the call has failed.

func ResourceExhausted added in v0.45.3

func ResourceExhausted(msg string, args ...interface{}) error

ResourceExhausted creates a new error that signals a request that failed because of lack of resources, e.g. user quotas.

func TimestampsEqual added in v0.89.0

func TimestampsEqual(ts1, ts2 *timestamppb.Timestamp) bool

TimestampsEqual compares two *timestamppb.Timestamp instances.

func Unauthenticated

func Unauthenticated(msg string, args ...interface{}) error

Unauthenticated creates a new error that signals an unauthenticated request.

func Unavailable added in v0.45.4

func Unavailable(msg string, args ...interface{}) error

Unavailable creates a new error that signals an unavailable service.

func Unknown

func Unknown(msg string, args ...interface{}) error

Unknown creates a new error that signals an unknown error.

Types

type Budget

type Budget struct {

	// How many resources of the specific kind are in use
	Used int64 `protobuf:"varint,1,opt,name=used,proto3" json:"used,omitempty"`
	// How many resources of the specific kind are still available.
	// Note a value above 0 does not mean that the caller has permission to add those resources.
	Available int64 `protobuf:"varint,2,opt,name=available,proto3" json:"available,omitempty"`
	// If set, there is no limit to the number of resources of a specific kind that can be created.
	// If set, available is 0.
	Unlimited bool `protobuf:"varint,3,opt,name=unlimited,proto3" json:"unlimited,omitempty"`
	// contains filtered or unexported fields
}

Budget for resources of a specific kind

func (*Budget) Descriptor deprecated

func (*Budget) Descriptor() ([]byte, []int)

Deprecated: Use Budget.ProtoReflect.Descriptor instead.

func (*Budget) GetAvailable

func (x *Budget) GetAvailable() int64

func (*Budget) GetUnlimited

func (x *Budget) GetUnlimited() bool

func (*Budget) GetUsed

func (x *Budget) GetUsed() int64

func (*Budget) ProtoMessage

func (*Budget) ProtoMessage()

func (*Budget) ProtoReflect added in v0.89.0

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

func (*Budget) Reset

func (x *Budget) Reset()

func (*Budget) String

func (x *Budget) String() string

type CauseFunc

type CauseFunc = func(error) error

CauseFunc specifies the prototype of a function that must return the cause of the given error. If there is not underlying cause, the given error itself must be retured. If nil is passed, nil must be returned.

type Empty

type Empty struct {
	// contains filtered or unexported fields
}

Empty message

func (*Empty) Descriptor deprecated

func (*Empty) Descriptor() ([]byte, []int)

Deprecated: Use Empty.ProtoReflect.Descriptor instead.

func (*Empty) ProtoMessage

func (*Empty) ProtoMessage()

func (*Empty) ProtoReflect added in v0.89.0

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

func (*Empty) Reset

func (x *Empty) Reset()

func (*Empty) String

func (x *Empty) String() string

type IDOptions

type IDOptions struct {

	// System identifier of the object to fetch.
	Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"`
	// contains filtered or unexported fields
}

Options for a get-by-id request

func (*IDOptions) Descriptor deprecated

func (*IDOptions) Descriptor() ([]byte, []int)

Deprecated: Use IDOptions.ProtoReflect.Descriptor instead.

func (*IDOptions) GetId

func (x *IDOptions) GetId() string

func (*IDOptions) ProtoMessage

func (*IDOptions) ProtoMessage()

func (*IDOptions) ProtoReflect added in v0.89.0

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

func (*IDOptions) Reset

func (x *IDOptions) Reset()

func (*IDOptions) String

func (x *IDOptions) String() string

type ListOptions

type ListOptions struct {

	// Maximum number of items to return.
	// If not specified, a default number items are returned.
	// Unless specified otherwise, the default number is DefaultPageSize.
	PageSize int32 `protobuf:"varint,1,opt,name=page_size,json=pageSize,proto3" json:"page_size,omitempty"`
	// Page to start with (defaults to 0).
	Page int64 `protobuf:"varint,2,opt,name=page,proto3" json:"page,omitempty"`
	// Identifier of the resource in which the list request is made.
	ContextId string `protobuf:"bytes,3,opt,name=context_id,json=contextId,proto3" json:"context_id,omitempty"`
	// contains filtered or unexported fields
}

Options for a list request.

func (*ListOptions) CloneOrDefault

func (opts *ListOptions) CloneOrDefault(defaultPageSize ...int32) *ListOptions

CloneOrDefault creates a clone of the given options if not nil, or creates an empty ListOptions. In either case, if current pageSize is zero, it is set to the given default page size or DefaultPageSize is not default page size is given.

func (*ListOptions) Descriptor deprecated

func (*ListOptions) Descriptor() ([]byte, []int)

Deprecated: Use ListOptions.ProtoReflect.Descriptor instead.

func (*ListOptions) GetContextId

func (x *ListOptions) GetContextId() string

func (*ListOptions) GetPage

func (x *ListOptions) GetPage() int64

func (*ListOptions) GetPageSize

func (x *ListOptions) GetPageSize() int32

func (*ListOptions) ProtoMessage

func (*ListOptions) ProtoMessage()

func (*ListOptions) ProtoReflect added in v0.89.0

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

func (*ListOptions) Reset

func (x *ListOptions) Reset()

func (*ListOptions) String

func (x *ListOptions) String() string

type URLOptions

type URLOptions struct {

	// URL of the resource to fetch.
	Url string `protobuf:"bytes,1,opt,name=url,proto3" json:"url,omitempty"`
	// contains filtered or unexported fields
}

Options for a get-by-url request

func (*URLOptions) Descriptor deprecated

func (*URLOptions) Descriptor() ([]byte, []int)

Deprecated: Use URLOptions.ProtoReflect.Descriptor instead.

func (*URLOptions) GetUrl

func (x *URLOptions) GetUrl() string

func (*URLOptions) ProtoMessage

func (*URLOptions) ProtoMessage()

func (*URLOptions) ProtoReflect added in v0.89.0

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

func (*URLOptions) Reset

func (x *URLOptions) Reset()

func (*URLOptions) String

func (x *URLOptions) String() string

type Version

type Version struct {

	// Major version (increasing may break APIs)
	Major int32 `protobuf:"varint,1,opt,name=major,proto3" json:"major,omitempty"`
	// Minor version (increased for new features)
	Minor int32 `protobuf:"varint,2,opt,name=minor,proto3" json:"minor,omitempty"`
	// Patch version (increased for fixed)
	Patch int32 `protobuf:"varint,3,opt,name=patch,proto3" json:"patch,omitempty"`
	// contains filtered or unexported fields
}

Semantic version number.

func (*Version) Descriptor deprecated

func (*Version) Descriptor() ([]byte, []int)

Deprecated: Use Version.ProtoReflect.Descriptor instead.

func (*Version) GetMajor

func (x *Version) GetMajor() int32

func (*Version) GetMinor

func (x *Version) GetMinor() int32

func (*Version) GetPatch

func (x *Version) GetPatch() int32

func (*Version) ProtoMessage

func (*Version) ProtoMessage()

func (*Version) ProtoReflect added in v0.89.0

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

func (*Version) Reset

func (x *Version) Reset()

func (*Version) String

func (x *Version) String() string

type YesOrNo

type YesOrNo struct {
	Result bool `protobuf:"varint,1,opt,name=result,proto3" json:"result,omitempty"`
	// contains filtered or unexported fields
}

Response for single boolean.

func (*YesOrNo) Descriptor deprecated

func (*YesOrNo) Descriptor() ([]byte, []int)

Deprecated: Use YesOrNo.ProtoReflect.Descriptor instead.

func (*YesOrNo) GetResult

func (x *YesOrNo) GetResult() bool

func (*YesOrNo) ProtoMessage

func (*YesOrNo) ProtoMessage()

func (*YesOrNo) ProtoReflect added in v0.89.0

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

func (*YesOrNo) Reset

func (x *YesOrNo) Reset()

func (*YesOrNo) String

func (x *YesOrNo) String() string

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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