session

package
v1.1.0 Latest Latest
Warning

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

Go to latest
Published: Jan 25, 2021 License: GPL-3.0 Imports: 6 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",
}
View Source
var ResultStatus_value = map[string]int32{
	"Success":     0,
	"MaxLimit":    1,
	"Repeated":    2,
	"NotExisted":  3,
	"DBException": 4,
	"Empty":       5,
}

Functions

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"`
	User                 string       `protobuf:"bytes,2,opt,name=user,proto3" json:"user,omitempty"`
	Available            bool         `protobuf:"varint,3,opt,name=available,proto3" json:"available,omitempty"`
	Status               *ReplyStatus `protobuf:"bytes,4,opt,name=status,proto3" json:"status,omitempty"`
	XXX_NoUnkeyedLiteral struct{}     `json:"-"`
	XXX_unrecognized     []byte       `json:"-"`
	XXX_sizecache        int32        `json:"-"`
}

func (*ReplyAvailable) Descriptor

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

func (*ReplyAvailable) GetAvailable

func (m *ReplyAvailable) GetAvailable() bool

func (*ReplyAvailable) GetStatus

func (m *ReplyAvailable) GetStatus() *ReplyStatus

func (*ReplyAvailable) GetUid

func (m *ReplyAvailable) GetUid() string

func (*ReplyAvailable) GetUser added in v1.0.2

func (m *ReplyAvailable) GetUser() string

func (*ReplyAvailable) ProtoMessage

func (*ReplyAvailable) ProtoMessage()

func (*ReplyAvailable) Reset

func (m *ReplyAvailable) Reset()

func (*ReplyAvailable) String

func (m *ReplyAvailable) String() string

func (*ReplyAvailable) XXX_DiscardUnknown added in v1.1.0

func (m *ReplyAvailable) XXX_DiscardUnknown()

func (*ReplyAvailable) XXX_Marshal added in v1.1.0

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

func (*ReplyAvailable) XXX_Merge added in v1.1.0

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

func (*ReplyAvailable) XXX_Size added in v1.1.0

func (m *ReplyAvailable) XXX_Size() int

func (*ReplyAvailable) XXX_Unmarshal added in v1.1.0

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

type ReplyInfo

type ReplyInfo struct {
	Uid                  string       `protobuf:"bytes,1,opt,name=uid,proto3" json:"uid,omitempty"`
	User                 string       `protobuf:"bytes,2,opt,name=user,proto3" json:"user,omitempty"`
	Token                string       `protobuf:"bytes,3,opt,name=token,proto3" json:"token,omitempty"`
	Status               *ReplyStatus `protobuf:"bytes,4,opt,name=status,proto3" json:"status,omitempty"`
	XXX_NoUnkeyedLiteral struct{}     `json:"-"`
	XXX_unrecognized     []byte       `json:"-"`
	XXX_sizecache        int32        `json:"-"`
}

func (*ReplyInfo) Descriptor

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

func (*ReplyInfo) GetStatus

func (m *ReplyInfo) GetStatus() *ReplyStatus

func (*ReplyInfo) GetToken

func (m *ReplyInfo) GetToken() string

func (*ReplyInfo) GetUid

func (m *ReplyInfo) GetUid() string

func (*ReplyInfo) GetUser added in v1.0.2

func (m *ReplyInfo) GetUser() string

func (*ReplyInfo) ProtoMessage

func (*ReplyInfo) ProtoMessage()

func (*ReplyInfo) Reset

func (m *ReplyInfo) Reset()

func (*ReplyInfo) String

func (m *ReplyInfo) String() string

func (*ReplyInfo) XXX_DiscardUnknown added in v1.1.0

func (m *ReplyInfo) XXX_DiscardUnknown()

func (*ReplyInfo) XXX_Marshal added in v1.1.0

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

func (*ReplyInfo) XXX_Merge added in v1.1.0

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

func (*ReplyInfo) XXX_Size added in v1.1.0

func (m *ReplyInfo) XXX_Size() int

func (*ReplyInfo) XXX_Unmarshal added in v1.1.0

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

type ReplyStatus added in v1.1.0

type ReplyStatus struct {
	Code                 ResultStatus `protobuf:"varint,1,opt,name=code,proto3,enum=omo.msp.session.ResultStatus" json:"code,omitempty"`
	Message              string       `protobuf:"bytes,2,opt,name=message,proto3" json:"message,omitempty"`
	XXX_NoUnkeyedLiteral struct{}     `json:"-"`
	XXX_unrecognized     []byte       `json:"-"`
	XXX_sizecache        int32        `json:"-"`
}

func (*ReplyStatus) Descriptor added in v1.1.0

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

func (*ReplyStatus) GetCode added in v1.1.0

func (m *ReplyStatus) GetCode() ResultStatus

func (*ReplyStatus) GetMessage added in v1.1.0

func (m *ReplyStatus) GetMessage() string

func (*ReplyStatus) ProtoMessage added in v1.1.0

func (*ReplyStatus) ProtoMessage()

func (*ReplyStatus) Reset added in v1.1.0

func (m *ReplyStatus) Reset()

func (*ReplyStatus) String added in v1.1.0

func (m *ReplyStatus) String() string

func (*ReplyStatus) XXX_DiscardUnknown added in v1.1.0

func (m *ReplyStatus) XXX_DiscardUnknown()

func (*ReplyStatus) XXX_Marshal added in v1.1.0

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

func (*ReplyStatus) XXX_Merge added in v1.1.0

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

func (*ReplyStatus) XXX_Size added in v1.1.0

func (m *ReplyStatus) XXX_Size() int

func (*ReplyStatus) XXX_Unmarshal added in v1.1.0

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

type ReqSessionAdd added in v1.0.1

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

func (*ReqSessionAdd) Descriptor added in v1.0.1

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

func (*ReqSessionAdd) GetUser added in v1.0.2

func (m *ReqSessionAdd) GetUser() string

func (*ReqSessionAdd) ProtoMessage added in v1.0.1

func (*ReqSessionAdd) ProtoMessage()

func (*ReqSessionAdd) Reset added in v1.0.1

func (m *ReqSessionAdd) Reset()

func (*ReqSessionAdd) String added in v1.0.1

func (m *ReqSessionAdd) String() string

func (*ReqSessionAdd) XXX_DiscardUnknown added in v1.1.0

func (m *ReqSessionAdd) XXX_DiscardUnknown()

func (*ReqSessionAdd) XXX_Marshal added in v1.1.0

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

func (*ReqSessionAdd) XXX_Merge added in v1.1.0

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

func (*ReqSessionAdd) XXX_Size added in v1.1.0

func (m *ReqSessionAdd) XXX_Size() int

func (*ReqSessionAdd) XXX_Unmarshal added in v1.1.0

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

type ReqSessionRemove added in v1.0.2

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

func (*ReqSessionRemove) Descriptor added in v1.0.2

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

func (*ReqSessionRemove) GetUser added in v1.0.2

func (m *ReqSessionRemove) GetUser() string

func (*ReqSessionRemove) ProtoMessage added in v1.0.2

func (*ReqSessionRemove) ProtoMessage()

func (*ReqSessionRemove) Reset added in v1.0.2

func (m *ReqSessionRemove) Reset()

func (*ReqSessionRemove) String added in v1.0.2

func (m *ReqSessionRemove) String() string

func (*ReqSessionRemove) XXX_DiscardUnknown added in v1.1.0

func (m *ReqSessionRemove) XXX_DiscardUnknown()

func (*ReqSessionRemove) XXX_Marshal added in v1.1.0

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

func (*ReqSessionRemove) XXX_Merge added in v1.1.0

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

func (*ReqSessionRemove) XXX_Size added in v1.1.0

func (m *ReqSessionRemove) XXX_Size() int

func (*ReqSessionRemove) XXX_Unmarshal added in v1.1.0

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

type RequestInfo

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

func (*RequestInfo) Descriptor

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

func (*RequestInfo) GetToken added in v1.0.1

func (m *RequestInfo) GetToken() string

func (*RequestInfo) ProtoMessage

func (*RequestInfo) ProtoMessage()

func (*RequestInfo) Reset

func (m *RequestInfo) Reset()

func (*RequestInfo) String

func (m *RequestInfo) String() string

func (*RequestInfo) XXX_DiscardUnknown added in v1.1.0

func (m *RequestInfo) XXX_DiscardUnknown()

func (*RequestInfo) XXX_Marshal added in v1.1.0

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

func (*RequestInfo) XXX_Merge added in v1.1.0

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

func (*RequestInfo) XXX_Size added in v1.1.0

func (m *RequestInfo) XXX_Size() int

func (*RequestInfo) XXX_Unmarshal added in v1.1.0

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

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) EnumDescriptor

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

func (ResultStatus) String

func (x ResultStatus) String() string

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 *ReqSessionRemove, 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, *ReqSessionRemove, *ReplyInfo) error
}

Jump to

Keyboard shortcuts

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