dml

package
v1.2.1 Latest Latest
Warning

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

Go to latest
Published: Oct 27, 2021 License: Apache-2.0 Imports: 14 Imported by: 14

Documentation

Overview

Package dml provides golang support for github.com/gaterace/xdml DmlExtension struct.

Index

Constants

This section is empty.

Variables

View Source
var File_DmlExtension_proto protoreflect.FileDescriptor

Functions

This section is empty.

Types

type DateTime

type DateTime struct {
	Milliseconds int64 `protobuf:"varint,1,opt,name=milliseconds,proto3" json:"milliseconds,omitempty"`
	// contains filtered or unexported fields
}

func DateTimeFromString

func DateTimeFromString(s string) *DateTime

Create a dml.DateTime structure from a string. String can be in format

YYYY-MM-DD HH:MM:SS

or

YYYY-MM-DD HH:MM:SS.dddddd

or

YYYY-MM-DD

func DateTimeFromTime added in v1.1.0

func DateTimeFromTime(t time.Time) *DateTime

Create a dml.Datetime structure from a time.Time value

func (*DateTime) Descriptor deprecated

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

Deprecated: Use DateTime.ProtoReflect.Descriptor instead.

func (*DateTime) GetMilliseconds

func (x *DateTime) GetMilliseconds() int64

func (*DateTime) MarshalJSON

func (m *DateTime) MarshalJSON() ([]byte, error)

func (*DateTime) ProtoMessage

func (*DateTime) ProtoMessage()

func (*DateTime) ProtoReflect added in v1.2.0

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

func (*DateTime) Reset

func (x *DateTime) Reset()

func (*DateTime) String

func (x *DateTime) String() string

func (*DateTime) TimeFromDateTime

func (m *DateTime) TimeFromDateTime() time.Time

Create a time.Time value from a dml.DateTime instance.

type Decimal

type Decimal struct {
	Plaintext string `protobuf:"bytes,1,opt,name=plaintext,proto3" json:"plaintext,omitempty"`
	// contains filtered or unexported fields
}

func ConvertDecimal

func ConvertDecimal(d sdec.Decimal) *Decimal

Convert shopspring decimal.Decimal to dml.Decimal

func DecimalFromString

func DecimalFromString(s string) (*Decimal, error)

Create a dml.Decimal struct from a string.

func (*Decimal) ConvertDecimal

func (m *Decimal) ConvertDecimal() (sdec.Decimal, error)

Convert dml.Decimal instance to shopspring decimal.Decimal

func (*Decimal) Descriptor deprecated

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

Deprecated: Use Decimal.ProtoReflect.Descriptor instead.

func (*Decimal) GetPlaintext

func (x *Decimal) GetPlaintext() string

func (*Decimal) ProtoMessage

func (*Decimal) ProtoMessage()

func (*Decimal) ProtoReflect added in v1.2.0

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

func (*Decimal) Reset

func (x *Decimal) Reset()

func (*Decimal) String

func (x *Decimal) String() string

func (*Decimal) StringFromDecimal

func (m *Decimal) StringFromDecimal() string

Get the string representation of a dml.Decimal instance.

type Guid

type Guid struct {
	Guid []byte `protobuf:"bytes,1,opt,name=guid,proto3" json:"guid,omitempty"`
	// contains filtered or unexported fields
}

func ConvertUuid

func ConvertUuid(id uuid.UUID) *Guid

Convert Uuid to dml.Guid

func GuidFromBytes added in v1.1.0

func GuidFromBytes(b []byte) (*Guid, error)

Create dml.Guid from byte slice

func GuidFromString added in v1.1.0

func GuidFromString(s string) (*Guid, error)

Create dml.Guid from string with hex representation

func NewGuid added in v1.1.0

func NewGuid() *Guid

Create a new dml.Guid

func (*Guid) ConvertUuid

func (m *Guid) ConvertUuid() (uuid.UUID, error)

Convert dml.Guid to Uuid.

func (*Guid) Descriptor deprecated

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

Deprecated: Use Guid.ProtoReflect.Descriptor instead.

func (*Guid) GetGuid

func (x *Guid) GetGuid() []byte

func (*Guid) MarshalJSON added in v1.1.0

func (m *Guid) MarshalJSON() ([]byte, error)

func (*Guid) ProtoMessage

func (*Guid) ProtoMessage()

func (*Guid) ProtoReflect added in v1.2.0

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

func (*Guid) Reset

func (x *Guid) Reset()

func (*Guid) String

func (x *Guid) String() string

Jump to

Keyboard shortcuts

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