pbutil

package
v0.5.3 Latest Latest
Warning

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

Go to latest
Published: Jan 21, 2021 License: Apache-2.0 Imports: 7 Imported by: 27

Documentation

Index

Constants

View Source
const (
	DefaultOffset = uint64(0)
	DefaultLimit  = uint64(20)
)

Variables

This section is empty.

Functions

func FromProtoTimestamp

func FromProtoTimestamp(t *timestamp.Timestamp) (tt time.Time)

func GetLimitFromRequest

func GetLimitFromRequest(req RequestHadLimit) uint64

func GetOffsetFromRequest

func GetOffsetFromRequest(req RequestHadOffset) uint64

func GetTime added in v0.4.0

func GetTime(t *timestamp.Timestamp) (tt time.Time)

func ToProtoBool

func ToProtoBool(bool bool) *wrappers.BoolValue

func ToProtoBytes added in v0.2.3

func ToProtoBytes(bytes []byte) *wrappers.BytesValue

func ToProtoInt32 added in v0.3.5

func ToProtoInt32(i int32) *wrappers.Int32Value

func ToProtoString

func ToProtoString(str string) *wrappers.StringValue

func ToProtoTimestamp

func ToProtoTimestamp(t time.Time) (tt *timestamp.Timestamp)

func ToProtoUInt32

func ToProtoUInt32(uint32 uint32) *wrappers.UInt32Value

Types

type DescribeApi added in v0.4.0

type DescribeApi interface {
	SetRequest(ctx context.Context, req interface{}, limit, offset uint32) error
	Describe(ctx context.Context, req interface{}, advancedParams ...string) (DescribeResponse, error)
}

type DescribeResponse added in v0.4.0

type DescribeResponse interface {
	GetTotalCount() uint32
}

func DescribeAllResponses added in v0.4.0

func DescribeAllResponses(ctx context.Context, describeApi DescribeApi, req interface{}, advancedParams ...string) ([]DescribeResponse, error)

type RequestHadLimit

type RequestHadLimit interface {
	GetLimit() uint32
}

type RequestHadOffset

type RequestHadOffset interface {
	GetOffset() uint32
}

Jump to

Keyboard shortcuts

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