Version: v0.0.2 Latest Latest

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

Go to latest
Published: Jul 31, 2020 License: Apache-2.0 Imports: 9 Imported by: 0




This section is empty.


View Source
var (
	ErrInvalidLengthObjectid        = fmt.Errorf("proto: negative length found during unmarshaling")
	ErrIntOverflowObjectid          = fmt.Errorf("proto: integer overflow")
	ErrUnexpectedEndOfGroupObjectid = fmt.Errorf("proto: unexpected end of group")


This section is empty.


type ObjectId

type ObjectId struct {
	Value                string   `protobuf:"bytes,1,opt,name=value,proto3" json:"value,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`

func NewObjectId

func NewObjectId(id primitive.ObjectID) *ObjectId

NewObjectId creates proto ObjectId from MongoDB ObjectID

func (*ObjectId) Descriptor

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

func (*ObjectId) GetObjectID

func (o *ObjectId) GetObjectID() (primitive.ObjectID, error)

GetObjectID returns MongoDB object ID

func (*ObjectId) GetValue

func (m *ObjectId) GetValue() string

func (*ObjectId) Marshal

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

func (*ObjectId) MarshalJSONPB

func (o *ObjectId) MarshalJSONPB(m *jsonpb.Marshaler) ([]byte, error)

MarshalJSONPB marshals ObjectId to JSONPB string

func (*ObjectId) MarshalTo

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

func (*ObjectId) MarshalToSizedBuffer

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

func (*ObjectId) ProtoMessage

func (*ObjectId) ProtoMessage()

func (*ObjectId) Reset

func (m *ObjectId) Reset()

func (*ObjectId) Size

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

func (*ObjectId) String

func (m *ObjectId) String() string

func (*ObjectId) Unmarshal

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

func (*ObjectId) UnmarshalJSONPB

func (o *ObjectId) UnmarshalJSONPB(m *jsonpb.Unmarshaler, data []byte) error

UnmarshalJSONPB unmarshal JSONPB string to ObjectId

func (*ObjectId) XXX_DiscardUnknown

func (m *ObjectId) XXX_DiscardUnknown()

func (*ObjectId) XXX_Marshal

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

func (*ObjectId) XXX_Merge

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

func (*ObjectId) XXX_Size

func (m *ObjectId) XXX_Size() int

func (*ObjectId) XXX_Unmarshal

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

Jump to

Keyboard shortcuts

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