session

package
v1.0.1 Latest Latest
Warning

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

Go to latest
Published: Jul 3, 2020 License: GPL-3.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ResultStatus_name = map[int32]string{
		0: "Success",
		1: "MaxLimit",
		2: "Repeated",
		3: "NotExisted",
		4: "DBException",
		5: "Empty",
	}
	ResultStatus_value = map[string]int32{
		"Success":     0,
		"MaxLimit":    1,
		"Repeated":    2,
		"NotExisted":  3,
		"DBException": 4,
		"Empty":       5,
	}
)

Enum value maps for ResultStatus.

View Source
var File_proto_session_sess_proto protoreflect.FileDescriptor

Functions

func NewSessionServiceEndpoints

func NewSessionServiceEndpoints() []*api.Endpoint

func RegisterSessionServiceHandler

func RegisterSessionServiceHandler(s server.Server, hdlr SessionServiceHandler, opts ...server.HandlerOption) error

Types

type ReplyAvailable

type ReplyAvailable struct {
	Uid       string       `protobuf:"bytes,1,opt,name=uid,proto3" json:"uid,omitempty"`
	Available bool         `protobuf:"varint,2,opt,name=available,proto3" json:"available,omitempty"`
	Status    ResultStatus `protobuf:"varint,3,opt,name=status,proto3,enum=omo.msp.session.ResultStatus" json:"status,omitempty"`
	// contains filtered or unexported fields
}

func (*ReplyAvailable) Descriptor deprecated

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

Deprecated: Use ReplyAvailable.ProtoReflect.Descriptor instead.

func (*ReplyAvailable) GetAvailable

func (x *ReplyAvailable) GetAvailable() bool

func (*ReplyAvailable) GetStatus

func (x *ReplyAvailable) GetStatus() ResultStatus

func (*ReplyAvailable) GetUid

func (x *ReplyAvailable) GetUid() string

func (*ReplyAvailable) ProtoMessage

func (*ReplyAvailable) ProtoMessage()

func (*ReplyAvailable) ProtoReflect

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

func (*ReplyAvailable) Reset

func (x *ReplyAvailable) Reset()

func (*ReplyAvailable) String

func (x *ReplyAvailable) String() string

type ReplyInfo

type ReplyInfo struct {
	Uid    string       `protobuf:"bytes,1,opt,name=uid,proto3" json:"uid,omitempty"`
	Token  string       `protobuf:"bytes,2,opt,name=token,proto3" json:"token,omitempty"`
	Status ResultStatus `protobuf:"varint,3,opt,name=status,proto3,enum=omo.msp.session.ResultStatus" json:"status,omitempty"`
	// contains filtered or unexported fields
}

func (*ReplyInfo) Descriptor deprecated

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

Deprecated: Use ReplyInfo.ProtoReflect.Descriptor instead.

func (*ReplyInfo) GetStatus

func (x *ReplyInfo) GetStatus() ResultStatus

func (*ReplyInfo) GetToken

func (x *ReplyInfo) GetToken() string

func (*ReplyInfo) GetUid

func (x *ReplyInfo) GetUid() string

func (*ReplyInfo) ProtoMessage

func (*ReplyInfo) ProtoMessage()

func (*ReplyInfo) ProtoReflect

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

func (*ReplyInfo) Reset

func (x *ReplyInfo) Reset()

func (*ReplyInfo) String

func (x *ReplyInfo) String() string

type ReqSessionAdd added in v1.0.1

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

func (*ReqSessionAdd) Descriptor deprecated added in v1.0.1

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

Deprecated: Use ReqSessionAdd.ProtoReflect.Descriptor instead.

func (*ReqSessionAdd) GetUid added in v1.0.1

func (x *ReqSessionAdd) GetUid() string

func (*ReqSessionAdd) ProtoMessage added in v1.0.1

func (*ReqSessionAdd) ProtoMessage()

func (*ReqSessionAdd) ProtoReflect added in v1.0.1

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

func (*ReqSessionAdd) Reset added in v1.0.1

func (x *ReqSessionAdd) Reset()

func (*ReqSessionAdd) String added in v1.0.1

func (x *ReqSessionAdd) String() string

type RequestInfo

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

func (*RequestInfo) Descriptor deprecated

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

Deprecated: Use RequestInfo.ProtoReflect.Descriptor instead.

func (*RequestInfo) GetToken added in v1.0.1

func (x *RequestInfo) GetToken() string

func (*RequestInfo) ProtoMessage

func (*RequestInfo) ProtoMessage()

func (*RequestInfo) ProtoReflect

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

func (*RequestInfo) Reset

func (x *RequestInfo) Reset()

func (*RequestInfo) String

func (x *RequestInfo) String() string

type ResultStatus

type ResultStatus int32
const (
	ResultStatus_Success     ResultStatus = 0
	ResultStatus_MaxLimit    ResultStatus = 1
	ResultStatus_Repeated    ResultStatus = 2
	ResultStatus_NotExisted  ResultStatus = 3
	ResultStatus_DBException ResultStatus = 4
	ResultStatus_Empty       ResultStatus = 5
)

func (ResultStatus) Descriptor

func (ResultStatus) Enum

func (x ResultStatus) Enum() *ResultStatus

func (ResultStatus) EnumDescriptor deprecated

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

Deprecated: Use ResultStatus.Descriptor instead.

func (ResultStatus) Number

func (ResultStatus) String

func (x ResultStatus) String() string

func (ResultStatus) Type

type SessionService

type SessionService interface {
	Create(ctx context.Context, in *ReqSessionAdd, opts ...client.CallOption) (*ReplyInfo, error)
	CheckAvailable(ctx context.Context, in *RequestInfo, opts ...client.CallOption) (*ReplyAvailable, error)
	Remove(ctx context.Context, in *RequestInfo, opts ...client.CallOption) (*ReplyInfo, error)
}

func NewSessionService

func NewSessionService(name string, c client.Client) SessionService

type SessionServiceHandler

type SessionServiceHandler interface {
	Create(context.Context, *ReqSessionAdd, *ReplyInfo) error
	CheckAvailable(context.Context, *RequestInfo, *ReplyAvailable) error
	Remove(context.Context, *RequestInfo, *ReplyInfo) error
}

Jump to

Keyboard shortcuts

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