common

package
v0.0.0-...-7a34736 Latest Latest
Warning

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

Go to latest
Published: May 22, 2021 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ResponseCode_name = map[int32]string{
		0: "ACCEPT",
		1: "REJECT",
		2: "PUT_ON_HOLD",
		3: "REDIRECT",
		4: "WAITING_FOR_APPROVAL",
	}
	ResponseCode_value = map[string]int32{
		"ACCEPT":               0,
		"REJECT":               1,
		"PUT_ON_HOLD":          2,
		"REDIRECT":             3,
		"WAITING_FOR_APPROVAL": 4,
	}
)

Enum value maps for ResponseCode.

View Source
var (
	ResultCode_name = map[int32]string{
		0: "OK",
		1: "NOK",
	}
	ResultCode_value = map[string]int32{
		"OK":  0,
		"NOK": 1,
	}
)

Enum value maps for ResultCode.

View Source
var File_pkg_common_common_proto protoreflect.FileDescriptor
View Source
var File_pkg_common_response_proto protoreflect.FileDescriptor

Functions

func MatchProperties

func MatchProperties(match, prop *Properties) bool

MatchProperties sees if match matches prop

func MatchProperty

func MatchProperty(match, prop *Property) bool

MatchProperty matches one property with another

Types

type GenericRsp

type GenericRsp struct {
	ResultCode ResultCode `protobuf:"varint,1,opt,name=result_code,json=resultCode,proto3,enum=common.ResultCode" json:"result_code,omitempty"`
	Message    string     `protobuf:"bytes,2,opt,name=message,proto3" json:"message,omitempty"`
	// contains filtered or unexported fields
}

func (*GenericRsp) Descriptor deprecated

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

Deprecated: Use GenericRsp.ProtoReflect.Descriptor instead.

func (*GenericRsp) GetMessage

func (x *GenericRsp) GetMessage() string

func (*GenericRsp) GetResultCode

func (x *GenericRsp) GetResultCode() ResultCode

func (*GenericRsp) ProtoMessage

func (*GenericRsp) ProtoMessage()

func (*GenericRsp) ProtoReflect

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

func (*GenericRsp) Reset

func (x *GenericRsp) Reset()

func (*GenericRsp) String

func (x *GenericRsp) String() string

type KeyVal

type KeyVal struct {
	Key string `protobuf:"bytes,1,opt,name=key,proto3" json:"key,omitempty"`
	Val string `protobuf:"bytes,2,opt,name=val,proto3" json:"val,omitempty"`
	// contains filtered or unexported fields
}

func (*KeyVal) Descriptor deprecated

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

Deprecated: Use KeyVal.ProtoReflect.Descriptor instead.

func (*KeyVal) GetKey

func (x *KeyVal) GetKey() string

func (*KeyVal) GetVal

func (x *KeyVal) GetVal() string

func (*KeyVal) ProtoMessage

func (*KeyVal) ProtoMessage()

func (*KeyVal) ProtoReflect

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

func (*KeyVal) Reset

func (x *KeyVal) Reset()

func (*KeyVal) String

func (x *KeyVal) String() string

type Metadata

type Metadata struct {
	Id         []byte      `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"`
	Name       string      `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty"`
	Type       string      `protobuf:"bytes,3,opt,name=type,proto3" json:"type,omitempty"`
	Namespace  string      `protobuf:"bytes,4,opt,name=namespace,proto3" json:"namespace,omitempty"`
	Properties *Properties `protobuf:"bytes,5,opt,name=properties,proto3" json:"properties,omitempty"`
	// contains filtered or unexported fields
}

func (*Metadata) Descriptor deprecated

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

Deprecated: Use Metadata.ProtoReflect.Descriptor instead.

func (*Metadata) GetId

func (x *Metadata) GetId() []byte

func (*Metadata) GetName

func (x *Metadata) GetName() string

func (*Metadata) GetNamespace

func (x *Metadata) GetNamespace() string

func (*Metadata) GetProperties

func (x *Metadata) GetProperties() *Properties

func (*Metadata) GetType

func (x *Metadata) GetType() string

func (*Metadata) ProtoMessage

func (*Metadata) ProtoMessage()

func (*Metadata) ProtoReflect

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

func (*Metadata) Reset

func (x *Metadata) Reset()

func (*Metadata) String

func (x *Metadata) String() string

type Properties

type Properties struct {
	Properties map[string]*Property `` /* 161-byte string literal not displayed */
	// contains filtered or unexported fields
}

func (*Properties) Descriptor deprecated

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

Deprecated: Use Properties.ProtoReflect.Descriptor instead.

func (*Properties) GetProperties

func (x *Properties) GetProperties() map[string]*Property

func (*Properties) ProtoMessage

func (*Properties) ProtoMessage()

func (*Properties) ProtoReflect

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

func (*Properties) Reset

func (x *Properties) Reset()

func (*Properties) String

func (x *Properties) String() string

type Property

type Property struct {
	StringVal  string      `protobuf:"bytes,1,opt,name=string_val,json=stringVal,proto3" json:"string_val,omitempty"`
	IntVal     int64       `protobuf:"varint,2,opt,name=int_val,json=intVal,proto3" json:"int_val,omitempty"`
	FloatVal   float32     `protobuf:"fixed32,3,opt,name=float_val,json=floatVal,proto3" json:"float_val,omitempty"`
	Properties *Properties `protobuf:"bytes,4,opt,name=properties,proto3" json:"properties,omitempty"`
	// contains filtered or unexported fields
}

func (*Property) Descriptor deprecated

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

Deprecated: Use Property.ProtoReflect.Descriptor instead.

func (*Property) GetFloatVal

func (x *Property) GetFloatVal() float32

func (*Property) GetIntVal

func (x *Property) GetIntVal() int64

func (*Property) GetProperties

func (x *Property) GetProperties() *Properties

func (*Property) GetStringVal

func (x *Property) GetStringVal() string

func (*Property) ProtoMessage

func (*Property) ProtoMessage()

func (*Property) ProtoReflect

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

func (*Property) Reset

func (x *Property) Reset()

func (*Property) String

func (x *Property) String() string

type Response

type Response struct {
	Code   ResponseCode `protobuf:"varint,1,opt,name=code,proto3,enum=common.ResponseCode" json:"code,omitempty"`
	Reason string       `protobuf:"bytes,2,opt,name=reason,proto3" json:"reason,omitempty"`
	// The meaning of address depends on the code.
	Address string `protobuf:"bytes,3,opt,name=address,proto3" json:"address,omitempty"`
	// The meaning of time depends on the code
	Time int64 `protobuf:"varint,4,opt,name=time,proto3" json:"time,omitempty"`
	// contains filtered or unexported fields
}

func (*Response) Descriptor deprecated

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

Deprecated: Use Response.ProtoReflect.Descriptor instead.

func (*Response) GetAddress

func (x *Response) GetAddress() string

func (*Response) GetCode

func (x *Response) GetCode() ResponseCode

func (*Response) GetReason

func (x *Response) GetReason() string

func (*Response) GetTime

func (x *Response) GetTime() int64

func (*Response) ProtoMessage

func (*Response) ProtoMessage()

func (*Response) ProtoReflect

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

func (*Response) Reset

func (x *Response) Reset()

func (*Response) String

func (x *Response) String() string

type ResponseCode

type ResponseCode int32
const (
	ResponseCode_ACCEPT               ResponseCode = 0
	ResponseCode_REJECT               ResponseCode = 1
	ResponseCode_PUT_ON_HOLD          ResponseCode = 2
	ResponseCode_REDIRECT             ResponseCode = 3
	ResponseCode_WAITING_FOR_APPROVAL ResponseCode = 4
)

func (ResponseCode) Descriptor

func (ResponseCode) Enum

func (x ResponseCode) Enum() *ResponseCode

func (ResponseCode) EnumDescriptor deprecated

func (ResponseCode) EnumDescriptor() ([]byte, []int)

Deprecated: Use ResponseCode.Descriptor instead.

func (ResponseCode) Number

func (ResponseCode) String

func (x ResponseCode) String() string

func (ResponseCode) Type

type Result

type Result struct {
	Code    ResultCode `protobuf:"varint,1,opt,name=code,proto3,enum=common.ResultCode" json:"code,omitempty"`
	Message string     `protobuf:"bytes,2,opt,name=message,proto3" json:"message,omitempty"`
	// contains filtered or unexported fields
}

func (*Result) Descriptor deprecated

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

Deprecated: Use Result.ProtoReflect.Descriptor instead.

func (*Result) GetCode

func (x *Result) GetCode() ResultCode

func (*Result) GetMessage

func (x *Result) GetMessage() string

func (*Result) ProtoMessage

func (*Result) ProtoMessage()

func (*Result) ProtoReflect

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

func (*Result) Reset

func (x *Result) Reset()

func (*Result) String

func (x *Result) String() string

type ResultCode

type ResultCode int32
const (
	ResultCode_OK  ResultCode = 0
	ResultCode_NOK ResultCode = 1
)

func (ResultCode) Descriptor

func (ResultCode) Descriptor() protoreflect.EnumDescriptor

func (ResultCode) Enum

func (x ResultCode) Enum() *ResultCode

func (ResultCode) EnumDescriptor deprecated

func (ResultCode) EnumDescriptor() ([]byte, []int)

Deprecated: Use ResultCode.Descriptor instead.

func (ResultCode) Number

func (x ResultCode) Number() protoreflect.EnumNumber

func (ResultCode) String

func (x ResultCode) String() string

func (ResultCode) Type

type Timestamp

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

func TimestampNow

func TimestampNow() *Timestamp

TimestampNow creates a new timestamp

func (*Timestamp) Descriptor deprecated

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

Deprecated: Use Timestamp.ProtoReflect.Descriptor instead.

func (*Timestamp) GetTime

func (x *Timestamp) GetTime() int64

func (*Timestamp) ProtoMessage

func (*Timestamp) ProtoMessage()

func (*Timestamp) ProtoReflect

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

func (*Timestamp) Reset

func (x *Timestamp) Reset()

func (*Timestamp) String

func (x *Timestamp) String() string

type Void

type Void struct {
	// contains filtered or unexported fields
}

func (*Void) Descriptor deprecated

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

Deprecated: Use Void.ProtoReflect.Descriptor instead.

func (*Void) ProtoMessage

func (*Void) ProtoMessage()

func (*Void) ProtoReflect

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

func (*Void) Reset

func (x *Void) Reset()

func (*Void) String

func (x *Void) String() string

Jump to

Keyboard shortcuts

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