pbsessions

package
v0.0.0-...-20fe154 Latest Latest
Warning

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

Go to latest
Published: Feb 21, 2020 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func RegisterSessionsServer

func RegisterSessionsServer(s *grpc.Server, srv SessionsServer)

Types

type CreateSessionRequest

type CreateSessionRequest struct {
	DomainId             string   `protobuf:"bytes,1,opt,name=domain_id,json=domainId,proto3" json:"domain_id,omitempty"`
	UserId               string   `protobuf:"bytes,2,opt,name=user_id,json=userId,proto3" json:"user_id,omitempty"`
	DurationSeconds      int64    `protobuf:"varint,3,opt,name=duration_seconds,json=durationSeconds,proto3" json:"duration_seconds,omitempty"`
	Groups               []string `protobuf:"bytes,4,rep,name=groups,proto3" json:"groups,omitempty"`
	External             bool     `protobuf:"varint,5,opt,name=external,proto3" json:"external,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

CreateSessionRequest contains the needed information to create

and maintain a new session

func (*CreateSessionRequest) Descriptor

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

func (*CreateSessionRequest) GetDomainId

func (m *CreateSessionRequest) GetDomainId() string

func (*CreateSessionRequest) GetDurationSeconds

func (m *CreateSessionRequest) GetDurationSeconds() int64

func (*CreateSessionRequest) GetExternal

func (m *CreateSessionRequest) GetExternal() bool

func (*CreateSessionRequest) GetGroups

func (m *CreateSessionRequest) GetGroups() []string

func (*CreateSessionRequest) GetUserId

func (m *CreateSessionRequest) GetUserId() string

func (*CreateSessionRequest) ProtoMessage

func (*CreateSessionRequest) ProtoMessage()

func (*CreateSessionRequest) Reset

func (m *CreateSessionRequest) Reset()

func (*CreateSessionRequest) String

func (m *CreateSessionRequest) String() string

func (*CreateSessionRequest) XXX_DiscardUnknown

func (m *CreateSessionRequest) XXX_DiscardUnknown()

func (*CreateSessionRequest) XXX_Marshal

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

func (*CreateSessionRequest) XXX_Merge

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

func (*CreateSessionRequest) XXX_Size

func (m *CreateSessionRequest) XXX_Size() int

func (*CreateSessionRequest) XXX_Unmarshal

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

type GetSessionRequest

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

GetSessionRequest contains the needed information to create

and maintain a new session

func (*GetSessionRequest) Descriptor

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

func (*GetSessionRequest) GetId

func (m *GetSessionRequest) GetId() string

func (*GetSessionRequest) ProtoMessage

func (*GetSessionRequest) ProtoMessage()

func (*GetSessionRequest) Reset

func (m *GetSessionRequest) Reset()

func (*GetSessionRequest) String

func (m *GetSessionRequest) String() string

func (*GetSessionRequest) XXX_DiscardUnknown

func (m *GetSessionRequest) XXX_DiscardUnknown()

func (*GetSessionRequest) XXX_Marshal

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

func (*GetSessionRequest) XXX_Merge

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

func (*GetSessionRequest) XXX_Size

func (m *GetSessionRequest) XXX_Size() int

func (*GetSessionRequest) XXX_Unmarshal

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

type Result

type Result struct {
	Result               bool     `protobuf:"varint,1,opt,name=result,proto3" json:"result,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

Result is used for deletes to return a boolean result to show success

func (*Result) Descriptor

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

func (*Result) GetResult

func (m *Result) GetResult() bool

func (*Result) ProtoMessage

func (*Result) ProtoMessage()

func (*Result) Reset

func (m *Result) Reset()

func (*Result) String

func (m *Result) String() string

func (*Result) XXX_DiscardUnknown

func (m *Result) XXX_DiscardUnknown()

func (*Result) XXX_Marshal

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

func (*Result) XXX_Merge

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

func (*Result) XXX_Size

func (m *Result) XXX_Size() int

func (*Result) XXX_Unmarshal

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

type Session

type Session struct {
	Id                   string   `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"`
	DomainId             string   `protobuf:"bytes,2,opt,name=domain_id,json=domainId,proto3" json:"domain_id,omitempty"`
	UserId               string   `protobuf:"bytes,3,opt,name=user_id,json=userId,proto3" json:"user_id,omitempty"`
	Groups               []string `protobuf:"bytes,4,rep,name=groups,proto3" json:"groups,omitempty"`
	ExpiresAt            int64    `protobuf:"varint,5,opt,name=expires_at,json=expiresAt,proto3" json:"expires_at,omitempty"`
	CreatedAt            int64    `protobuf:"varint,6,opt,name=created_at,json=createdAt,proto3" json:"created_at,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

Session is the session data that is shared with other services

func (*Session) Descriptor

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

func (*Session) GetCreatedAt

func (m *Session) GetCreatedAt() int64

func (*Session) GetDomainId

func (m *Session) GetDomainId() string

func (*Session) GetExpiresAt

func (m *Session) GetExpiresAt() int64

func (*Session) GetGroups

func (m *Session) GetGroups() []string

func (*Session) GetId

func (m *Session) GetId() string

func (*Session) GetUserId

func (m *Session) GetUserId() string

func (*Session) ProtoMessage

func (*Session) ProtoMessage()

func (*Session) Reset

func (m *Session) Reset()

func (*Session) String

func (m *Session) String() string

func (*Session) XXX_DiscardUnknown

func (m *Session) XXX_DiscardUnknown()

func (*Session) XXX_Marshal

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

func (*Session) XXX_Merge

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

func (*Session) XXX_Size

func (m *Session) XXX_Size() int

func (*Session) XXX_Unmarshal

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

type SessionsClient

type SessionsClient interface {
	// CreateSession ask for a session creation
	CreateSession(ctx context.Context, in *CreateSessionRequest, opts ...grpc.CallOption) (*Session, error)
	// GetSession returns a session already established
	GetSession(ctx context.Context, in *GetSessionRequest, opts ...grpc.CallOption) (*Session, error)
	// DeleteSession removes a session if exists, returns transaction status as result
	DeleteSession(ctx context.Context, in *GetSessionRequest, opts ...grpc.CallOption) (*Result, error)
}

SessionsClient is the client API for Sessions service.

For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream.

func NewSessionsClient

func NewSessionsClient(cc *grpc.ClientConn) SessionsClient

type SessionsServer

type SessionsServer interface {
	// CreateSession ask for a session creation
	CreateSession(context.Context, *CreateSessionRequest) (*Session, error)
	// GetSession returns a session already established
	GetSession(context.Context, *GetSessionRequest) (*Session, error)
	// DeleteSession removes a session if exists, returns transaction status as result
	DeleteSession(context.Context, *GetSessionRequest) (*Result, error)
}

SessionsServer is the server API for Sessions service.

Jump to

Keyboard shortcuts

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