Documentation ¶
Overview ¶
Package v1 contains the common types used in API of ArangoDB Managed Service
Index ¶
- Constants
- Variables
- func Aborted(msg string, args ...interface{}) error
- func AlreadyExists(msg string, args ...interface{}) error
- func Canceled(msg string, args ...interface{}) error
- func Cause(err error) error
- func CloneDuration(s *durationpb.Duration) *durationpb.Duration
- func CloneTimestamp(s *timestamppb.Timestamp) *timestamppb.Timestamp
- func CommonError(err error) error
- func CompareDurations(d1, d2 *durationpb.Duration) int
- func CompareTimestamps(ts1, ts2 *timestamppb.Timestamp) int
- func DeadlineExceeded(msg string, args ...interface{}) error
- func DurationsEqual(d1, d2 *durationpb.Duration) bool
- func InvalidArgument(msg string, args ...interface{}) error
- func IsAborted(err error) bool
- func IsAlreadyExists(err error) bool
- func IsCanceled(err error) bool
- func IsDeadlineExceeded(err error) bool
- func IsInvalidArgument(err error) bool
- func IsNotFound(err error) bool
- func IsPermissionDenied(err error) bool
- func IsPreconditionFailed(err error) bool
- func IsResourceExhausted(err error) bool
- func IsUnauthenticated(err error) bool
- func IsUnavailable(err error) bool
- func IsUnknown(err error) bool
- func NotFound(msg string, args ...interface{}) error
- func PermissionDenied(msg string, args ...interface{}) error
- func PreconditionFailed(msg string, args ...interface{}) error
- func ResourceExhausted(msg string, args ...interface{}) error
- func TimestampsEqual(ts1, ts2 *timestamppb.Timestamp) bool
- func Unauthenticated(msg string, args ...interface{}) error
- func Unavailable(msg string, args ...interface{}) error
- func Unknown(msg string, args ...interface{}) error
- type Budget
- func (*Budget) Descriptor() ([]byte, []int)deprecated
- func (x *Budget) GetAvailable() int64
- func (x *Budget) GetUnlimited() bool
- func (x *Budget) GetUsed() int64
- func (*Budget) ProtoMessage()
- func (x *Budget) ProtoReflect() protoreflect.Message
- func (x *Budget) Reset()
- func (x *Budget) String() string
- type CauseFunc
- type Empty
- type IDOptions
- type ListOptions
- func (opts *ListOptions) CloneOrDefault(defaultPageSize ...int32) *ListOptions
- func (*ListOptions) Descriptor() ([]byte, []int)deprecated
- func (x *ListOptions) GetContextId() string
- func (x *ListOptions) GetPage() int64
- func (x *ListOptions) GetPageSize() int32
- func (*ListOptions) ProtoMessage()
- func (x *ListOptions) ProtoReflect() protoreflect.Message
- func (x *ListOptions) Reset()
- func (x *ListOptions) String() string
- type URLOptions
- type Version
- func (*Version) Descriptor() ([]byte, []int)deprecated
- func (x *Version) GetMajor() int32
- func (x *Version) GetMinor() int32
- func (x *Version) GetPatch() int32
- func (*Version) ProtoMessage()
- func (x *Version) ProtoReflect() protoreflect.Message
- func (x *Version) Reset()
- func (x *Version) String() string
- type YesOrNo
Constants ¶
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 )
const (
// DefaultPageSize is the default number of items per List request.
DefaultPageSize = 50
)
Variables ¶
var File_common_proto protoreflect.FileDescriptor
Functions ¶
func Aborted ¶ added in v0.45.4
Aborted creates a new error that signals that an operation was aborted.
func AlreadyExists ¶
AlreadyExists creates a new error that signals a request to create an object that already exists.
func Canceled ¶
Canceled creates a new error that signals a request that was canceled. Typically by the caller.
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
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 ¶
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 ¶
InvalidArgument creates a new error that signals a request with invalid arguments.
func IsAborted ¶ added in v0.45.4
IsAborted returns true if the given error signals that the operation was aborted.
func IsAlreadyExists ¶
IsAlreadyExists returns true if the given error signals a request to create an object that already exists.
func IsCanceled ¶
IsCanceled returns true if the given error signals a request that was canceled. Typically by the caller.
func IsDeadlineExceeded ¶
IsDeadlineExceeded returns true if the given error signals a request that timed out.
func IsInvalidArgument ¶
IsInvalidArgument returns true if the given error signals a request with invalid arguments.
func IsNotFound ¶
IsNotFound returns true if the given error signals a request to an object that is not found.
func IsPermissionDenied ¶
IsPermissionDenied returns true if the given error signals a request that the caller has not enough permissions for.
func IsPreconditionFailed ¶
IsPreconditionFailed returns true if the given error signals a precondition of the request has failed.
func IsResourceExhausted ¶ added in v0.45.3
IsResourceExhausted returns true if the given error signals a request that failed because of lack of resources, e.g. user quotas.
func IsUnauthenticated ¶
IsUnauthenticated returns true if the given error signals an unauthenticated request.
func IsUnavailable ¶ added in v0.45.4
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 PermissionDenied ¶
PermissionDenied creates a new error that signals a request that the caller has not enough permissions for.
func PreconditionFailed ¶
PreconditionFailed creates a new error that signals a request that a precondition of the call has failed.
func ResourceExhausted ¶ added in v0.45.3
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 ¶
Unauthenticated creates a new error that signals an unauthenticated request.
func Unavailable ¶ added in v0.45.4
Unavailable creates a new error that signals an unavailable service.
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) GetAvailable ¶
func (*Budget) GetUnlimited ¶
func (*Budget) ProtoMessage ¶
func (*Budget) ProtoMessage()
func (*Budget) ProtoReflect ¶ added in v0.89.0
func (x *Budget) ProtoReflect() protoreflect.Message
type CauseFunc ¶
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) ProtoMessage ¶
func (*Empty) ProtoMessage()
func (*Empty) ProtoReflect ¶ added in v0.89.0
func (x *Empty) ProtoReflect() protoreflect.Message
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) ProtoMessage ¶
func (*IDOptions) ProtoMessage()
func (*IDOptions) ProtoReflect ¶ added in v0.89.0
func (x *IDOptions) ProtoReflect() protoreflect.Message
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) ProtoMessage ¶
func (*Version) ProtoMessage()
func (*Version) ProtoReflect ¶ added in v0.89.0
func (x *Version) ProtoReflect() protoreflect.Message
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) ProtoMessage ¶
func (*YesOrNo) ProtoMessage()
func (*YesOrNo) ProtoReflect ¶ added in v0.89.0
func (x *YesOrNo) ProtoReflect() protoreflect.Message