v1

package
v0.51.0 Latest Latest
Warning

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

Go to latest
Published: Nov 24, 2020 License: Apache-2.0 Imports: 8 Imported by: 20

Documentation

Overview

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

Index

Constants

View Source
const (
	// DefaultPageSize is the default number of items per List request.
	DefaultPageSize = 50
)

Variables

View Source
var (
	ErrInvalidLengthCommon = fmt.Errorf("proto: negative length found during unmarshaling")
	ErrIntOverflowCommon   = fmt.Errorf("proto: integer overflow")
)
View Source
var Cause = func(err error) error { return err }

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

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 CloneDuration

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

CloneDuration creates a deep copy of the given duration

func CloneTimestamp

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

CloneTimestamp creates a deep clone of the given timestamp

func DeadlineExceeded

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

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

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 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"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

Budget for resources of a specific kind

func (*Budget) Descriptor

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

func (*Budget) GetAvailable

func (m *Budget) GetAvailable() int64

func (*Budget) GetUnlimited

func (m *Budget) GetUnlimited() bool

func (*Budget) GetUsed

func (m *Budget) GetUsed() int64

func (*Budget) Marshal

func (m *Budget) Marshal() (dAtA []byte, err error)

func (*Budget) MarshalTo

func (m *Budget) MarshalTo(dAtA []byte) (int, error)

func (*Budget) MarshalToSizedBuffer

func (m *Budget) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*Budget) ProtoMessage

func (*Budget) ProtoMessage()

func (*Budget) Reset

func (m *Budget) Reset()

func (*Budget) Size

func (m *Budget) Size() (n int)

func (*Budget) String

func (m *Budget) String() string

func (*Budget) Unmarshal

func (m *Budget) Unmarshal(dAtA []byte) error

func (*Budget) XXX_DiscardUnknown

func (m *Budget) XXX_DiscardUnknown()

func (*Budget) XXX_Marshal

func (m *Budget) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*Budget) XXX_Merge

func (m *Budget) XXX_Merge(src proto.Message)

func (*Budget) XXX_Size

func (m *Budget) XXX_Size() int

func (*Budget) XXX_Unmarshal

func (m *Budget) XXX_Unmarshal(b []byte) error

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 {
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

Empty message

func (*Empty) Descriptor

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

func (*Empty) Marshal

func (m *Empty) Marshal() (dAtA []byte, err error)

func (*Empty) MarshalTo

func (m *Empty) MarshalTo(dAtA []byte) (int, error)

func (*Empty) MarshalToSizedBuffer

func (m *Empty) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*Empty) ProtoMessage

func (*Empty) ProtoMessage()

func (*Empty) Reset

func (m *Empty) Reset()

func (*Empty) Size

func (m *Empty) Size() (n int)

func (*Empty) String

func (m *Empty) String() string

func (*Empty) Unmarshal

func (m *Empty) Unmarshal(dAtA []byte) error

func (*Empty) XXX_DiscardUnknown

func (m *Empty) XXX_DiscardUnknown()

func (*Empty) XXX_Marshal

func (m *Empty) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*Empty) XXX_Merge

func (m *Empty) XXX_Merge(src proto.Message)

func (*Empty) XXX_Size

func (m *Empty) XXX_Size() int

func (*Empty) XXX_Unmarshal

func (m *Empty) XXX_Unmarshal(b []byte) error

type IDOptions

type IDOptions struct {
	// System identifier of the object to fetch.
	Id                   string   `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

Options for a get-by-id request

func (*IDOptions) Descriptor

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

func (*IDOptions) GetId

func (m *IDOptions) GetId() string

func (*IDOptions) Marshal

func (m *IDOptions) Marshal() (dAtA []byte, err error)

func (*IDOptions) MarshalTo

func (m *IDOptions) MarshalTo(dAtA []byte) (int, error)

func (*IDOptions) MarshalToSizedBuffer

func (m *IDOptions) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*IDOptions) ProtoMessage

func (*IDOptions) ProtoMessage()

func (*IDOptions) Reset

func (m *IDOptions) Reset()

func (*IDOptions) Size

func (m *IDOptions) Size() (n int)

func (*IDOptions) String

func (m *IDOptions) String() string

func (*IDOptions) Unmarshal

func (m *IDOptions) Unmarshal(dAtA []byte) error

func (*IDOptions) XXX_DiscardUnknown

func (m *IDOptions) XXX_DiscardUnknown()

func (*IDOptions) XXX_Marshal

func (m *IDOptions) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*IDOptions) XXX_Merge

func (m *IDOptions) XXX_Merge(src proto.Message)

func (*IDOptions) XXX_Size

func (m *IDOptions) XXX_Size() int

func (*IDOptions) XXX_Unmarshal

func (m *IDOptions) XXX_Unmarshal(b []byte) error

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"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

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

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

func (*ListOptions) GetContextId

func (m *ListOptions) GetContextId() string

func (*ListOptions) GetPage

func (m *ListOptions) GetPage() int64

func (*ListOptions) GetPageSize

func (m *ListOptions) GetPageSize() int32

func (*ListOptions) Marshal

func (m *ListOptions) Marshal() (dAtA []byte, err error)

func (*ListOptions) MarshalTo

func (m *ListOptions) MarshalTo(dAtA []byte) (int, error)

func (*ListOptions) MarshalToSizedBuffer

func (m *ListOptions) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*ListOptions) ProtoMessage

func (*ListOptions) ProtoMessage()

func (*ListOptions) Reset

func (m *ListOptions) Reset()

func (*ListOptions) Size

func (m *ListOptions) Size() (n int)

func (*ListOptions) String

func (m *ListOptions) String() string

func (*ListOptions) Unmarshal

func (m *ListOptions) Unmarshal(dAtA []byte) error

func (*ListOptions) XXX_DiscardUnknown

func (m *ListOptions) XXX_DiscardUnknown()

func (*ListOptions) XXX_Marshal

func (m *ListOptions) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*ListOptions) XXX_Merge

func (m *ListOptions) XXX_Merge(src proto.Message)

func (*ListOptions) XXX_Size

func (m *ListOptions) XXX_Size() int

func (*ListOptions) XXX_Unmarshal

func (m *ListOptions) XXX_Unmarshal(b []byte) error

type URLOptions

type URLOptions struct {
	// URL of the resource to fetch.
	Url                  string   `protobuf:"bytes,1,opt,name=url,proto3" json:"url,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

Options for a get-by-url request

func (*URLOptions) Descriptor

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

func (*URLOptions) GetUrl

func (m *URLOptions) GetUrl() string

func (*URLOptions) Marshal

func (m *URLOptions) Marshal() (dAtA []byte, err error)

func (*URLOptions) MarshalTo

func (m *URLOptions) MarshalTo(dAtA []byte) (int, error)

func (*URLOptions) MarshalToSizedBuffer

func (m *URLOptions) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*URLOptions) ProtoMessage

func (*URLOptions) ProtoMessage()

func (*URLOptions) Reset

func (m *URLOptions) Reset()

func (*URLOptions) Size

func (m *URLOptions) Size() (n int)

func (*URLOptions) String

func (m *URLOptions) String() string

func (*URLOptions) Unmarshal

func (m *URLOptions) Unmarshal(dAtA []byte) error

func (*URLOptions) XXX_DiscardUnknown

func (m *URLOptions) XXX_DiscardUnknown()

func (*URLOptions) XXX_Marshal

func (m *URLOptions) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*URLOptions) XXX_Merge

func (m *URLOptions) XXX_Merge(src proto.Message)

func (*URLOptions) XXX_Size

func (m *URLOptions) XXX_Size() int

func (*URLOptions) XXX_Unmarshal

func (m *URLOptions) XXX_Unmarshal(b []byte) error

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"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

Semantic version number.

func (*Version) Descriptor

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

func (*Version) GetMajor

func (m *Version) GetMajor() int32

func (*Version) GetMinor

func (m *Version) GetMinor() int32

func (*Version) GetPatch

func (m *Version) GetPatch() int32

func (*Version) Marshal

func (m *Version) Marshal() (dAtA []byte, err error)

func (*Version) MarshalTo

func (m *Version) MarshalTo(dAtA []byte) (int, error)

func (*Version) MarshalToSizedBuffer

func (m *Version) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*Version) ProtoMessage

func (*Version) ProtoMessage()

func (*Version) Reset

func (m *Version) Reset()

func (*Version) Size

func (m *Version) Size() (n int)

func (*Version) String

func (m *Version) String() string

func (*Version) Unmarshal

func (m *Version) Unmarshal(dAtA []byte) error

func (*Version) XXX_DiscardUnknown

func (m *Version) XXX_DiscardUnknown()

func (*Version) XXX_Marshal

func (m *Version) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*Version) XXX_Merge

func (m *Version) XXX_Merge(src proto.Message)

func (*Version) XXX_Size

func (m *Version) XXX_Size() int

func (*Version) XXX_Unmarshal

func (m *Version) XXX_Unmarshal(b []byte) error

type YesOrNo

type YesOrNo struct {
	Result               bool     `protobuf:"varint,1,opt,name=result,proto3" json:"result,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

Response for single boolean.

func (*YesOrNo) Descriptor

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

func (*YesOrNo) GetResult

func (m *YesOrNo) GetResult() bool

func (*YesOrNo) Marshal

func (m *YesOrNo) Marshal() (dAtA []byte, err error)

func (*YesOrNo) MarshalTo

func (m *YesOrNo) MarshalTo(dAtA []byte) (int, error)

func (*YesOrNo) MarshalToSizedBuffer

func (m *YesOrNo) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*YesOrNo) ProtoMessage

func (*YesOrNo) ProtoMessage()

func (*YesOrNo) Reset

func (m *YesOrNo) Reset()

func (*YesOrNo) Size

func (m *YesOrNo) Size() (n int)

func (*YesOrNo) String

func (m *YesOrNo) String() string

func (*YesOrNo) Unmarshal

func (m *YesOrNo) Unmarshal(dAtA []byte) error

func (*YesOrNo) XXX_DiscardUnknown

func (m *YesOrNo) XXX_DiscardUnknown()

func (*YesOrNo) XXX_Marshal

func (m *YesOrNo) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*YesOrNo) XXX_Merge

func (m *YesOrNo) XXX_Merge(src proto.Message)

func (*YesOrNo) XXX_Size

func (m *YesOrNo) XXX_Size() int

func (*YesOrNo) XXX_Unmarshal

func (m *YesOrNo) XXX_Unmarshal(b []byte) error

Jump to

Keyboard shortcuts

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