Documentation ¶
Index ¶
- Variables
- func RegisterSessionsServer(s grpc.ServiceRegistrar, srv SessionsServer)
- type AddSessionRequest
- func (*AddSessionRequest) Descriptor() ([]byte, []int)deprecated
- func (x *AddSessionRequest) GetDevServer() bool
- func (x *AddSessionRequest) GetExpiryTimestampSeconds() uint64
- func (x *AddSessionRequest) GetLabel() string
- func (x *AddSessionRequest) GetMacaroonCustomPermissions() []*MacaroonPermission
- func (x *AddSessionRequest) GetMailboxServerAddr() string
- func (x *AddSessionRequest) GetSessionType() SessionType
- func (*AddSessionRequest) ProtoMessage()
- func (x *AddSessionRequest) ProtoReflect() protoreflect.Message
- func (x *AddSessionRequest) Reset()
- func (x *AddSessionRequest) String() string
- type AddSessionResponse
- func (*AddSessionResponse) Descriptor() ([]byte, []int)deprecated
- func (x *AddSessionResponse) GetSession() *Session
- func (*AddSessionResponse) ProtoMessage()
- func (x *AddSessionResponse) ProtoReflect() protoreflect.Message
- func (x *AddSessionResponse) Reset()
- func (x *AddSessionResponse) String() string
- type ListSessionsRequest
- type ListSessionsResponse
- func (*ListSessionsResponse) Descriptor() ([]byte, []int)deprecated
- func (x *ListSessionsResponse) GetSessions() []*Session
- func (*ListSessionsResponse) ProtoMessage()
- func (x *ListSessionsResponse) ProtoReflect() protoreflect.Message
- func (x *ListSessionsResponse) Reset()
- func (x *ListSessionsResponse) String() string
- type MacaroonPermission
- func (*MacaroonPermission) Descriptor() ([]byte, []int)deprecated
- func (x *MacaroonPermission) GetAction() string
- func (x *MacaroonPermission) GetEntity() string
- func (*MacaroonPermission) ProtoMessage()
- func (x *MacaroonPermission) ProtoReflect() protoreflect.Message
- func (x *MacaroonPermission) Reset()
- func (x *MacaroonPermission) String() string
- type RevokeSessionRequest
- func (*RevokeSessionRequest) Descriptor() ([]byte, []int)deprecated
- func (x *RevokeSessionRequest) GetLocalPublicKey() []byte
- func (*RevokeSessionRequest) ProtoMessage()
- func (x *RevokeSessionRequest) ProtoReflect() protoreflect.Message
- func (x *RevokeSessionRequest) Reset()
- func (x *RevokeSessionRequest) String() string
- type RevokeSessionResponse
- type Session
- func (*Session) Descriptor() ([]byte, []int)deprecated
- func (x *Session) GetDevServer() bool
- func (x *Session) GetExpiryTimestampSeconds() uint64
- func (x *Session) GetLabel() string
- func (x *Session) GetLocalPublicKey() []byte
- func (x *Session) GetMailboxServerAddr() string
- func (x *Session) GetPairingSecret() []byte
- func (x *Session) GetPairingSecretMnemonic() string
- func (x *Session) GetRemotePublicKey() []byte
- func (x *Session) GetSessionState() SessionState
- func (x *Session) GetSessionType() SessionType
- func (*Session) ProtoMessage()
- func (x *Session) ProtoReflect() protoreflect.Message
- func (x *Session) Reset()
- func (x *Session) String() string
- type SessionState
- func (SessionState) Descriptor() protoreflect.EnumDescriptor
- func (x SessionState) Enum() *SessionState
- func (SessionState) EnumDescriptor() ([]byte, []int)deprecated
- func (x SessionState) Number() protoreflect.EnumNumber
- func (x SessionState) String() string
- func (SessionState) Type() protoreflect.EnumType
- type SessionType
- func (SessionType) Descriptor() protoreflect.EnumDescriptor
- func (x SessionType) Enum() *SessionType
- func (SessionType) EnumDescriptor() ([]byte, []int)deprecated
- func (x SessionType) Number() protoreflect.EnumNumber
- func (x SessionType) String() string
- func (SessionType) Type() protoreflect.EnumType
- type SessionsClient
- type SessionsServer
- type UnimplementedSessionsServer
- func (UnimplementedSessionsServer) AddSession(context.Context, *AddSessionRequest) (*AddSessionResponse, error)
- func (UnimplementedSessionsServer) ListSessions(context.Context, *ListSessionsRequest) (*ListSessionsResponse, error)
- func (UnimplementedSessionsServer) RevokeSession(context.Context, *RevokeSessionRequest) (*RevokeSessionResponse, error)
- type UnsafeSessionsServer
Constants ¶
This section is empty.
Variables ¶
var ( SessionType_name = map[int32]string{ 0: "TYPE_MACAROON_READONLY", 1: "TYPE_MACAROON_ADMIN", 2: "TYPE_MACAROON_CUSTOM", 3: "TYPE_UI_PASSWORD", } SessionType_value = map[string]int32{ "TYPE_MACAROON_READONLY": 0, "TYPE_MACAROON_ADMIN": 1, "TYPE_MACAROON_CUSTOM": 2, "TYPE_UI_PASSWORD": 3, } )
Enum value maps for SessionType.
var ( SessionState_name = map[int32]string{ 0: "STATE_CREATED", 1: "STATE_IN_USE", 2: "STATE_REVOKED", 3: "STATE_EXPIRED", } SessionState_value = map[string]int32{ "STATE_CREATED": 0, "STATE_IN_USE": 1, "STATE_REVOKED": 2, "STATE_EXPIRED": 3, } )
Enum value maps for SessionState.
var File_lit_sessions_proto protoreflect.FileDescriptor
var Sessions_ServiceDesc = grpc.ServiceDesc{ ServiceName: "litrpc.Sessions", HandlerType: (*SessionsServer)(nil), Methods: []grpc.MethodDesc{ { MethodName: "AddSession", Handler: _Sessions_AddSession_Handler, }, { MethodName: "ListSessions", Handler: _Sessions_ListSessions_Handler, }, { MethodName: "RevokeSession", Handler: _Sessions_RevokeSession_Handler, }, }, Streams: []grpc.StreamDesc{}, Metadata: "lit-sessions.proto", }
Sessions_ServiceDesc is the grpc.ServiceDesc for Sessions service. It's only intended for direct use with grpc.RegisterService, and not to be introspected or modified (even as a copy)
Functions ¶
func RegisterSessionsServer ¶
func RegisterSessionsServer(s grpc.ServiceRegistrar, srv SessionsServer)
Types ¶
type AddSessionRequest ¶
type AddSessionRequest struct { Label string `protobuf:"bytes,1,opt,name=label,proto3" json:"label,omitempty"` SessionType SessionType `protobuf:"varint,2,opt,name=session_type,json=sessionType,proto3,enum=litrpc.SessionType" json:"session_type,omitempty"` ExpiryTimestampSeconds uint64 `` /* 130-byte string literal not displayed */ MailboxServerAddr string `protobuf:"bytes,4,opt,name=mailbox_server_addr,json=mailboxServerAddr,proto3" json:"mailbox_server_addr,omitempty"` DevServer bool `protobuf:"varint,5,opt,name=dev_server,json=devServer,proto3" json:"dev_server,omitempty"` MacaroonCustomPermissions []*MacaroonPermission `` /* 138-byte string literal not displayed */ // contains filtered or unexported fields }
func (*AddSessionRequest) Descriptor
deprecated
func (*AddSessionRequest) Descriptor() ([]byte, []int)
Deprecated: Use AddSessionRequest.ProtoReflect.Descriptor instead.
func (*AddSessionRequest) GetDevServer ¶
func (x *AddSessionRequest) GetDevServer() bool
func (*AddSessionRequest) GetExpiryTimestampSeconds ¶
func (x *AddSessionRequest) GetExpiryTimestampSeconds() uint64
func (*AddSessionRequest) GetLabel ¶
func (x *AddSessionRequest) GetLabel() string
func (*AddSessionRequest) GetMacaroonCustomPermissions ¶
func (x *AddSessionRequest) GetMacaroonCustomPermissions() []*MacaroonPermission
func (*AddSessionRequest) GetMailboxServerAddr ¶
func (x *AddSessionRequest) GetMailboxServerAddr() string
func (*AddSessionRequest) GetSessionType ¶
func (x *AddSessionRequest) GetSessionType() SessionType
func (*AddSessionRequest) ProtoMessage ¶
func (*AddSessionRequest) ProtoMessage()
func (*AddSessionRequest) ProtoReflect ¶
func (x *AddSessionRequest) ProtoReflect() protoreflect.Message
func (*AddSessionRequest) Reset ¶
func (x *AddSessionRequest) Reset()
func (*AddSessionRequest) String ¶
func (x *AddSessionRequest) String() string
type AddSessionResponse ¶
type AddSessionResponse struct { Session *Session `protobuf:"bytes,1,opt,name=session,proto3" json:"session,omitempty"` // contains filtered or unexported fields }
func (*AddSessionResponse) Descriptor
deprecated
func (*AddSessionResponse) Descriptor() ([]byte, []int)
Deprecated: Use AddSessionResponse.ProtoReflect.Descriptor instead.
func (*AddSessionResponse) GetSession ¶
func (x *AddSessionResponse) GetSession() *Session
func (*AddSessionResponse) ProtoMessage ¶
func (*AddSessionResponse) ProtoMessage()
func (*AddSessionResponse) ProtoReflect ¶
func (x *AddSessionResponse) ProtoReflect() protoreflect.Message
func (*AddSessionResponse) Reset ¶
func (x *AddSessionResponse) Reset()
func (*AddSessionResponse) String ¶
func (x *AddSessionResponse) String() string
type ListSessionsRequest ¶
type ListSessionsRequest struct {
// contains filtered or unexported fields
}
func (*ListSessionsRequest) Descriptor
deprecated
func (*ListSessionsRequest) Descriptor() ([]byte, []int)
Deprecated: Use ListSessionsRequest.ProtoReflect.Descriptor instead.
func (*ListSessionsRequest) ProtoMessage ¶
func (*ListSessionsRequest) ProtoMessage()
func (*ListSessionsRequest) ProtoReflect ¶
func (x *ListSessionsRequest) ProtoReflect() protoreflect.Message
func (*ListSessionsRequest) Reset ¶
func (x *ListSessionsRequest) Reset()
func (*ListSessionsRequest) String ¶
func (x *ListSessionsRequest) String() string
type ListSessionsResponse ¶
type ListSessionsResponse struct { Sessions []*Session `protobuf:"bytes,1,rep,name=sessions,proto3" json:"sessions,omitempty"` // contains filtered or unexported fields }
func (*ListSessionsResponse) Descriptor
deprecated
func (*ListSessionsResponse) Descriptor() ([]byte, []int)
Deprecated: Use ListSessionsResponse.ProtoReflect.Descriptor instead.
func (*ListSessionsResponse) GetSessions ¶
func (x *ListSessionsResponse) GetSessions() []*Session
func (*ListSessionsResponse) ProtoMessage ¶
func (*ListSessionsResponse) ProtoMessage()
func (*ListSessionsResponse) ProtoReflect ¶
func (x *ListSessionsResponse) ProtoReflect() protoreflect.Message
func (*ListSessionsResponse) Reset ¶
func (x *ListSessionsResponse) Reset()
func (*ListSessionsResponse) String ¶
func (x *ListSessionsResponse) String() string
type MacaroonPermission ¶
type MacaroonPermission struct { // The entity a permission grants access to. Entity string `protobuf:"bytes,1,opt,name=entity,proto3" json:"entity,omitempty"` // The action that is granted. Action string `protobuf:"bytes,2,opt,name=action,proto3" json:"action,omitempty"` // contains filtered or unexported fields }
func (*MacaroonPermission) Descriptor
deprecated
func (*MacaroonPermission) Descriptor() ([]byte, []int)
Deprecated: Use MacaroonPermission.ProtoReflect.Descriptor instead.
func (*MacaroonPermission) GetAction ¶
func (x *MacaroonPermission) GetAction() string
func (*MacaroonPermission) GetEntity ¶
func (x *MacaroonPermission) GetEntity() string
func (*MacaroonPermission) ProtoMessage ¶
func (*MacaroonPermission) ProtoMessage()
func (*MacaroonPermission) ProtoReflect ¶
func (x *MacaroonPermission) ProtoReflect() protoreflect.Message
func (*MacaroonPermission) Reset ¶
func (x *MacaroonPermission) Reset()
func (*MacaroonPermission) String ¶
func (x *MacaroonPermission) String() string
type RevokeSessionRequest ¶
type RevokeSessionRequest struct { LocalPublicKey []byte `protobuf:"bytes,8,opt,name=local_public_key,json=localPublicKey,proto3" json:"local_public_key,omitempty"` // contains filtered or unexported fields }
func (*RevokeSessionRequest) Descriptor
deprecated
func (*RevokeSessionRequest) Descriptor() ([]byte, []int)
Deprecated: Use RevokeSessionRequest.ProtoReflect.Descriptor instead.
func (*RevokeSessionRequest) GetLocalPublicKey ¶
func (x *RevokeSessionRequest) GetLocalPublicKey() []byte
func (*RevokeSessionRequest) ProtoMessage ¶
func (*RevokeSessionRequest) ProtoMessage()
func (*RevokeSessionRequest) ProtoReflect ¶
func (x *RevokeSessionRequest) ProtoReflect() protoreflect.Message
func (*RevokeSessionRequest) Reset ¶
func (x *RevokeSessionRequest) Reset()
func (*RevokeSessionRequest) String ¶
func (x *RevokeSessionRequest) String() string
type RevokeSessionResponse ¶
type RevokeSessionResponse struct {
// contains filtered or unexported fields
}
func (*RevokeSessionResponse) Descriptor
deprecated
func (*RevokeSessionResponse) Descriptor() ([]byte, []int)
Deprecated: Use RevokeSessionResponse.ProtoReflect.Descriptor instead.
func (*RevokeSessionResponse) ProtoMessage ¶
func (*RevokeSessionResponse) ProtoMessage()
func (*RevokeSessionResponse) ProtoReflect ¶
func (x *RevokeSessionResponse) ProtoReflect() protoreflect.Message
func (*RevokeSessionResponse) Reset ¶
func (x *RevokeSessionResponse) Reset()
func (*RevokeSessionResponse) String ¶
func (x *RevokeSessionResponse) String() string
type Session ¶
type Session struct { Label string `protobuf:"bytes,1,opt,name=label,proto3" json:"label,omitempty"` SessionState SessionState `protobuf:"varint,2,opt,name=session_state,json=sessionState,proto3,enum=litrpc.SessionState" json:"session_state,omitempty"` SessionType SessionType `protobuf:"varint,3,opt,name=session_type,json=sessionType,proto3,enum=litrpc.SessionType" json:"session_type,omitempty"` ExpiryTimestampSeconds uint64 `` /* 130-byte string literal not displayed */ MailboxServerAddr string `protobuf:"bytes,5,opt,name=mailbox_server_addr,json=mailboxServerAddr,proto3" json:"mailbox_server_addr,omitempty"` DevServer bool `protobuf:"varint,6,opt,name=dev_server,json=devServer,proto3" json:"dev_server,omitempty"` PairingSecret []byte `protobuf:"bytes,7,opt,name=pairing_secret,json=pairingSecret,proto3" json:"pairing_secret,omitempty"` PairingSecretMnemonic string `` /* 126-byte string literal not displayed */ LocalPublicKey []byte `protobuf:"bytes,9,opt,name=local_public_key,json=localPublicKey,proto3" json:"local_public_key,omitempty"` RemotePublicKey []byte `protobuf:"bytes,10,opt,name=remote_public_key,json=remotePublicKey,proto3" json:"remote_public_key,omitempty"` // contains filtered or unexported fields }
func (*Session) Descriptor
deprecated
func (*Session) GetDevServer ¶
func (*Session) GetExpiryTimestampSeconds ¶
func (*Session) GetLocalPublicKey ¶
func (*Session) GetMailboxServerAddr ¶
func (*Session) GetPairingSecret ¶
func (*Session) GetPairingSecretMnemonic ¶
func (*Session) GetRemotePublicKey ¶
func (*Session) GetSessionState ¶
func (x *Session) GetSessionState() SessionState
func (*Session) GetSessionType ¶
func (x *Session) GetSessionType() SessionType
func (*Session) ProtoMessage ¶
func (*Session) ProtoMessage()
func (*Session) ProtoReflect ¶
func (x *Session) ProtoReflect() protoreflect.Message
type SessionState ¶
type SessionState int32
const ( SessionState_STATE_CREATED SessionState = 0 SessionState_STATE_IN_USE SessionState = 1 SessionState_STATE_REVOKED SessionState = 2 SessionState_STATE_EXPIRED SessionState = 3 )
func (SessionState) Descriptor ¶
func (SessionState) Descriptor() protoreflect.EnumDescriptor
func (SessionState) Enum ¶
func (x SessionState) Enum() *SessionState
func (SessionState) EnumDescriptor
deprecated
func (SessionState) EnumDescriptor() ([]byte, []int)
Deprecated: Use SessionState.Descriptor instead.
func (SessionState) Number ¶
func (x SessionState) Number() protoreflect.EnumNumber
func (SessionState) String ¶
func (x SessionState) String() string
func (SessionState) Type ¶
func (SessionState) Type() protoreflect.EnumType
type SessionType ¶
type SessionType int32
const ( SessionType_TYPE_MACAROON_READONLY SessionType = 0 SessionType_TYPE_MACAROON_ADMIN SessionType = 1 SessionType_TYPE_MACAROON_CUSTOM SessionType = 2 SessionType_TYPE_UI_PASSWORD SessionType = 3 )
func (SessionType) Descriptor ¶
func (SessionType) Descriptor() protoreflect.EnumDescriptor
func (SessionType) Enum ¶
func (x SessionType) Enum() *SessionType
func (SessionType) EnumDescriptor
deprecated
func (SessionType) EnumDescriptor() ([]byte, []int)
Deprecated: Use SessionType.Descriptor instead.
func (SessionType) Number ¶
func (x SessionType) Number() protoreflect.EnumNumber
func (SessionType) String ¶
func (x SessionType) String() string
func (SessionType) Type ¶
func (SessionType) Type() protoreflect.EnumType
type SessionsClient ¶
type SessionsClient interface { AddSession(ctx context.Context, in *AddSessionRequest, opts ...grpc.CallOption) (*AddSessionResponse, error) ListSessions(ctx context.Context, in *ListSessionsRequest, opts ...grpc.CallOption) (*ListSessionsResponse, error) RevokeSession(ctx context.Context, in *RevokeSessionRequest, opts ...grpc.CallOption) (*RevokeSessionResponse, error) }
SessionsClient is the client API for Sessions service.
For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream.
func NewSessionsClient ¶
func NewSessionsClient(cc grpc.ClientConnInterface) SessionsClient
type SessionsServer ¶
type SessionsServer interface { AddSession(context.Context, *AddSessionRequest) (*AddSessionResponse, error) ListSessions(context.Context, *ListSessionsRequest) (*ListSessionsResponse, error) RevokeSession(context.Context, *RevokeSessionRequest) (*RevokeSessionResponse, error) // contains filtered or unexported methods }
SessionsServer is the server API for Sessions service. All implementations must embed UnimplementedSessionsServer for forward compatibility
type UnimplementedSessionsServer ¶
type UnimplementedSessionsServer struct { }
UnimplementedSessionsServer must be embedded to have forward compatible implementations.
func (UnimplementedSessionsServer) AddSession ¶
func (UnimplementedSessionsServer) AddSession(context.Context, *AddSessionRequest) (*AddSessionResponse, error)
func (UnimplementedSessionsServer) ListSessions ¶
func (UnimplementedSessionsServer) ListSessions(context.Context, *ListSessionsRequest) (*ListSessionsResponse, error)
func (UnimplementedSessionsServer) RevokeSession ¶
func (UnimplementedSessionsServer) RevokeSession(context.Context, *RevokeSessionRequest) (*RevokeSessionResponse, error)
type UnsafeSessionsServer ¶
type UnsafeSessionsServer interface {
// contains filtered or unexported methods
}
UnsafeSessionsServer may be embedded to opt out of forward compatibility for this service. Use of this interface is not recommended, as added methods to SessionsServer will result in compilation errors.