Documentation ¶
Index ¶
- Constants
- Variables
- func RegisterSessionSvcServer(s grpc.ServiceRegistrar, srv SessionSvcServer)
- type CreateSessionRequest
- func (*CreateSessionRequest) Descriptor() ([]byte, []int)deprecated
- func (x *CreateSessionRequest) GetAccessCode() string
- func (x *CreateSessionRequest) GetCourse() string
- func (x *CreateSessionRequest) GetKeepCourseVm() bool
- func (x *CreateSessionRequest) GetLabels() map[string]string
- func (x *CreateSessionRequest) GetScenario() string
- func (x *CreateSessionRequest) GetUser() string
- func (x *CreateSessionRequest) GetVmClaim() []string
- func (*CreateSessionRequest) ProtoMessage()
- func (x *CreateSessionRequest) ProtoReflect() protoreflect.Message
- func (x *CreateSessionRequest) Reset()
- func (x *CreateSessionRequest) String() string
- 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 Session
- func (*Session) Descriptor() ([]byte, []int)deprecated
- func (x *Session) GetAccessCode() string
- func (x *Session) GetCourse() string
- func (x *Session) GetId() string
- func (x *Session) GetKeepCourseVm() bool
- func (x *Session) GetLabels() map[string]string
- func (x *Session) GetScenario() string
- func (x *Session) GetStatus() *SessionStatus
- func (x *Session) GetUid() string
- func (x *Session) GetUser() string
- func (x *Session) GetVmClaim() []string
- func (*Session) ProtoMessage()
- func (x *Session) ProtoReflect() protoreflect.Message
- func (x *Session) Reset()
- func (x *Session) String() string
- type SessionStatus
- func (*SessionStatus) Descriptor() ([]byte, []int)deprecated
- func (x *SessionStatus) GetActive() bool
- func (x *SessionStatus) GetExpirationTime() string
- func (x *SessionStatus) GetFinished() bool
- func (x *SessionStatus) GetPaused() bool
- func (x *SessionStatus) GetPausedTime() string
- func (x *SessionStatus) GetStartTime() string
- func (*SessionStatus) ProtoMessage()
- func (x *SessionStatus) ProtoReflect() protoreflect.Message
- func (x *SessionStatus) Reset()
- func (x *SessionStatus) String() string
- type SessionSvcClient
- type SessionSvcServer
- type UnimplementedSessionSvcServer
- func (UnimplementedSessionSvcServer) CreateSession(context.Context, *CreateSessionRequest) (*general.ResourceId, error)
- func (UnimplementedSessionSvcServer) DeleteCollectionSession(context.Context, *general.ListOptions) (*emptypb.Empty, error)
- func (UnimplementedSessionSvcServer) DeleteSession(context.Context, *general.ResourceId) (*emptypb.Empty, error)
- func (UnimplementedSessionSvcServer) GetSession(context.Context, *general.GetRequest) (*Session, error)
- func (UnimplementedSessionSvcServer) ListSession(context.Context, *general.ListOptions) (*ListSessionsResponse, error)
- func (UnimplementedSessionSvcServer) UpdateSession(context.Context, *UpdateSessionRequest) (*emptypb.Empty, error)
- func (UnimplementedSessionSvcServer) UpdateSessionStatus(context.Context, *UpdateSessionStatusRequest) (*emptypb.Empty, error)
- type UnsafeSessionSvcServer
- type UpdateSessionRequest
- func (*UpdateSessionRequest) Descriptor() ([]byte, []int)deprecated
- func (x *UpdateSessionRequest) GetId() string
- func (x *UpdateSessionRequest) GetScenario() string
- func (*UpdateSessionRequest) ProtoMessage()
- func (x *UpdateSessionRequest) ProtoReflect() protoreflect.Message
- func (x *UpdateSessionRequest) Reset()
- func (x *UpdateSessionRequest) String() string
- type UpdateSessionStatusRequest
- func (*UpdateSessionStatusRequest) Descriptor() ([]byte, []int)deprecated
- func (x *UpdateSessionStatusRequest) GetActive() *wrapperspb.BoolValue
- func (x *UpdateSessionStatusRequest) GetExpirationTime() string
- func (x *UpdateSessionStatusRequest) GetFinished() *wrapperspb.BoolValue
- func (x *UpdateSessionStatusRequest) GetId() string
- func (x *UpdateSessionStatusRequest) GetPaused() *wrapperspb.BoolValue
- func (x *UpdateSessionStatusRequest) GetPausedTime() *wrapperspb.StringValue
- func (x *UpdateSessionStatusRequest) GetStartTime() string
- func (*UpdateSessionStatusRequest) ProtoMessage()
- func (x *UpdateSessionStatusRequest) ProtoReflect() protoreflect.Message
- func (x *UpdateSessionStatusRequest) Reset()
- func (x *UpdateSessionStatusRequest) String() string
Constants ¶
const ( SessionSvc_CreateSession_FullMethodName = "/session.SessionSvc/CreateSession" SessionSvc_GetSession_FullMethodName = "/session.SessionSvc/GetSession" SessionSvc_UpdateSession_FullMethodName = "/session.SessionSvc/UpdateSession" SessionSvc_UpdateSessionStatus_FullMethodName = "/session.SessionSvc/UpdateSessionStatus" SessionSvc_DeleteSession_FullMethodName = "/session.SessionSvc/DeleteSession" SessionSvc_DeleteCollectionSession_FullMethodName = "/session.SessionSvc/DeleteCollectionSession" SessionSvc_ListSession_FullMethodName = "/session.SessionSvc/ListSession" )
Variables ¶
var File_session_session_proto protoreflect.FileDescriptor
var SessionSvc_ServiceDesc = grpc.ServiceDesc{ ServiceName: "session.SessionSvc", HandlerType: (*SessionSvcServer)(nil), Methods: []grpc.MethodDesc{ { MethodName: "CreateSession", Handler: _SessionSvc_CreateSession_Handler, }, { MethodName: "GetSession", Handler: _SessionSvc_GetSession_Handler, }, { MethodName: "UpdateSession", Handler: _SessionSvc_UpdateSession_Handler, }, { MethodName: "UpdateSessionStatus", Handler: _SessionSvc_UpdateSessionStatus_Handler, }, { MethodName: "DeleteSession", Handler: _SessionSvc_DeleteSession_Handler, }, { MethodName: "DeleteCollectionSession", Handler: _SessionSvc_DeleteCollectionSession_Handler, }, { MethodName: "ListSession", Handler: _SessionSvc_ListSession_Handler, }, }, Streams: []grpc.StreamDesc{}, Metadata: "session/session.proto", }
SessionSvc_ServiceDesc is the grpc.ServiceDesc for SessionSvc service. It's only intended for direct use with grpc.RegisterService, and not to be introspected or modified (even as a copy)
Functions ¶
func RegisterSessionSvcServer ¶
func RegisterSessionSvcServer(s grpc.ServiceRegistrar, srv SessionSvcServer)
Types ¶
type CreateSessionRequest ¶
type CreateSessionRequest struct { Scenario string `protobuf:"bytes,1,opt,name=scenario,proto3" json:"scenario,omitempty"` Course string `protobuf:"bytes,2,opt,name=course,proto3" json:"course,omitempty"` KeepCourseVm bool `protobuf:"varint,3,opt,name=keep_course_vm,json=keepCourseVm,proto3" json:"keep_course_vm,omitempty"` User string `protobuf:"bytes,4,opt,name=user,proto3" json:"user,omitempty"` VmClaim []string `protobuf:"bytes,5,rep,name=vm_claim,json=vmClaim,proto3" json:"vm_claim,omitempty"` AccessCode string `protobuf:"bytes,6,opt,name=access_code,json=accessCode,proto3" json:"access_code,omitempty"` Labels map[string]string `` /* 153-byte string literal not displayed */ // contains filtered or unexported fields }
func (*CreateSessionRequest) Descriptor
deprecated
func (*CreateSessionRequest) Descriptor() ([]byte, []int)
Deprecated: Use CreateSessionRequest.ProtoReflect.Descriptor instead.
func (*CreateSessionRequest) GetAccessCode ¶
func (x *CreateSessionRequest) GetAccessCode() string
func (*CreateSessionRequest) GetCourse ¶
func (x *CreateSessionRequest) GetCourse() string
func (*CreateSessionRequest) GetKeepCourseVm ¶
func (x *CreateSessionRequest) GetKeepCourseVm() bool
func (*CreateSessionRequest) GetLabels ¶
func (x *CreateSessionRequest) GetLabels() map[string]string
func (*CreateSessionRequest) GetScenario ¶
func (x *CreateSessionRequest) GetScenario() string
func (*CreateSessionRequest) GetUser ¶
func (x *CreateSessionRequest) GetUser() string
func (*CreateSessionRequest) GetVmClaim ¶
func (x *CreateSessionRequest) GetVmClaim() []string
func (*CreateSessionRequest) ProtoMessage ¶
func (*CreateSessionRequest) ProtoMessage()
func (*CreateSessionRequest) ProtoReflect ¶
func (x *CreateSessionRequest) ProtoReflect() protoreflect.Message
func (*CreateSessionRequest) Reset ¶
func (x *CreateSessionRequest) Reset()
func (*CreateSessionRequest) String ¶
func (x *CreateSessionRequest) 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 Session ¶
type Session struct { Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` Uid string `protobuf:"bytes,2,opt,name=uid,proto3" json:"uid,omitempty"` Scenario string `protobuf:"bytes,3,opt,name=scenario,proto3" json:"scenario,omitempty"` Course string `protobuf:"bytes,4,opt,name=course,proto3" json:"course,omitempty"` KeepCourseVm bool `protobuf:"varint,5,opt,name=keep_course_vm,json=keepCourseVm,proto3" json:"keep_course_vm,omitempty"` User string `protobuf:"bytes,6,opt,name=user,proto3" json:"user,omitempty"` VmClaim []string `protobuf:"bytes,7,rep,name=vm_claim,json=vmClaim,proto3" json:"vm_claim,omitempty"` AccessCode string `protobuf:"bytes,8,opt,name=access_code,json=accessCode,proto3" json:"access_code,omitempty"` Labels map[string]string `` /* 153-byte string literal not displayed */ Status *SessionStatus `protobuf:"bytes,10,opt,name=status,proto3" json:"status,omitempty"` // contains filtered or unexported fields }
func (*Session) Descriptor
deprecated
func (*Session) GetAccessCode ¶
func (*Session) GetKeepCourseVm ¶
func (*Session) GetScenario ¶
func (*Session) GetStatus ¶
func (x *Session) GetStatus() *SessionStatus
func (*Session) GetVmClaim ¶
func (*Session) ProtoMessage ¶
func (*Session) ProtoMessage()
func (*Session) ProtoReflect ¶
func (x *Session) ProtoReflect() protoreflect.Message
type SessionStatus ¶
type SessionStatus struct { Paused bool `protobuf:"varint,1,opt,name=paused,proto3" json:"paused,omitempty"` PausedTime string `protobuf:"bytes,2,opt,name=paused_time,json=pausedTime,proto3" json:"paused_time,omitempty"` Active bool `protobuf:"varint,3,opt,name=active,proto3" json:"active,omitempty"` Finished bool `protobuf:"varint,4,opt,name=finished,proto3" json:"finished,omitempty"` StartTime string `protobuf:"bytes,5,opt,name=start_time,json=startTime,proto3" json:"start_time,omitempty"` ExpirationTime string `protobuf:"bytes,6,opt,name=expiration_time,json=expirationTime,proto3" json:"expiration_time,omitempty"` // contains filtered or unexported fields }
func (*SessionStatus) Descriptor
deprecated
func (*SessionStatus) Descriptor() ([]byte, []int)
Deprecated: Use SessionStatus.ProtoReflect.Descriptor instead.
func (*SessionStatus) GetActive ¶
func (x *SessionStatus) GetActive() bool
func (*SessionStatus) GetExpirationTime ¶
func (x *SessionStatus) GetExpirationTime() string
func (*SessionStatus) GetFinished ¶
func (x *SessionStatus) GetFinished() bool
func (*SessionStatus) GetPaused ¶
func (x *SessionStatus) GetPaused() bool
func (*SessionStatus) GetPausedTime ¶
func (x *SessionStatus) GetPausedTime() string
func (*SessionStatus) GetStartTime ¶
func (x *SessionStatus) GetStartTime() string
func (*SessionStatus) ProtoMessage ¶
func (*SessionStatus) ProtoMessage()
func (*SessionStatus) ProtoReflect ¶
func (x *SessionStatus) ProtoReflect() protoreflect.Message
func (*SessionStatus) Reset ¶
func (x *SessionStatus) Reset()
func (*SessionStatus) String ¶
func (x *SessionStatus) String() string
type SessionSvcClient ¶
type SessionSvcClient interface { CreateSession(ctx context.Context, in *CreateSessionRequest, opts ...grpc.CallOption) (*general.ResourceId, error) GetSession(ctx context.Context, in *general.GetRequest, opts ...grpc.CallOption) (*Session, error) UpdateSession(ctx context.Context, in *UpdateSessionRequest, opts ...grpc.CallOption) (*emptypb.Empty, error) UpdateSessionStatus(ctx context.Context, in *UpdateSessionStatusRequest, opts ...grpc.CallOption) (*emptypb.Empty, error) DeleteSession(ctx context.Context, in *general.ResourceId, opts ...grpc.CallOption) (*emptypb.Empty, error) DeleteCollectionSession(ctx context.Context, in *general.ListOptions, opts ...grpc.CallOption) (*emptypb.Empty, error) ListSession(ctx context.Context, in *general.ListOptions, opts ...grpc.CallOption) (*ListSessionsResponse, error) }
SessionSvcClient is the client API for SessionSvc 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 NewSessionSvcClient ¶
func NewSessionSvcClient(cc grpc.ClientConnInterface) SessionSvcClient
type SessionSvcServer ¶
type SessionSvcServer interface { CreateSession(context.Context, *CreateSessionRequest) (*general.ResourceId, error) GetSession(context.Context, *general.GetRequest) (*Session, error) UpdateSession(context.Context, *UpdateSessionRequest) (*emptypb.Empty, error) UpdateSessionStatus(context.Context, *UpdateSessionStatusRequest) (*emptypb.Empty, error) DeleteSession(context.Context, *general.ResourceId) (*emptypb.Empty, error) DeleteCollectionSession(context.Context, *general.ListOptions) (*emptypb.Empty, error) ListSession(context.Context, *general.ListOptions) (*ListSessionsResponse, error) // contains filtered or unexported methods }
SessionSvcServer is the server API for SessionSvc service. All implementations must embed UnimplementedSessionSvcServer for forward compatibility
type UnimplementedSessionSvcServer ¶
type UnimplementedSessionSvcServer struct { }
UnimplementedSessionSvcServer must be embedded to have forward compatible implementations.
func (UnimplementedSessionSvcServer) CreateSession ¶
func (UnimplementedSessionSvcServer) CreateSession(context.Context, *CreateSessionRequest) (*general.ResourceId, error)
func (UnimplementedSessionSvcServer) DeleteCollectionSession ¶
func (UnimplementedSessionSvcServer) DeleteCollectionSession(context.Context, *general.ListOptions) (*emptypb.Empty, error)
func (UnimplementedSessionSvcServer) DeleteSession ¶
func (UnimplementedSessionSvcServer) DeleteSession(context.Context, *general.ResourceId) (*emptypb.Empty, error)
func (UnimplementedSessionSvcServer) GetSession ¶
func (UnimplementedSessionSvcServer) GetSession(context.Context, *general.GetRequest) (*Session, error)
func (UnimplementedSessionSvcServer) ListSession ¶
func (UnimplementedSessionSvcServer) ListSession(context.Context, *general.ListOptions) (*ListSessionsResponse, error)
func (UnimplementedSessionSvcServer) UpdateSession ¶
func (UnimplementedSessionSvcServer) UpdateSession(context.Context, *UpdateSessionRequest) (*emptypb.Empty, error)
func (UnimplementedSessionSvcServer) UpdateSessionStatus ¶
func (UnimplementedSessionSvcServer) UpdateSessionStatus(context.Context, *UpdateSessionStatusRequest) (*emptypb.Empty, error)
type UnsafeSessionSvcServer ¶
type UnsafeSessionSvcServer interface {
// contains filtered or unexported methods
}
UnsafeSessionSvcServer may be embedded to opt out of forward compatibility for this service. Use of this interface is not recommended, as added methods to SessionSvcServer will result in compilation errors.
type UpdateSessionRequest ¶
type UpdateSessionRequest struct { Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` Scenario string `protobuf:"bytes,2,opt,name=scenario,proto3" json:"scenario,omitempty"` // contains filtered or unexported fields }
Currently sessions are bound to a course, user and access code Thus, only the scenario for a session can be updated
func (*UpdateSessionRequest) Descriptor
deprecated
func (*UpdateSessionRequest) Descriptor() ([]byte, []int)
Deprecated: Use UpdateSessionRequest.ProtoReflect.Descriptor instead.
func (*UpdateSessionRequest) GetId ¶
func (x *UpdateSessionRequest) GetId() string
func (*UpdateSessionRequest) GetScenario ¶
func (x *UpdateSessionRequest) GetScenario() string
func (*UpdateSessionRequest) ProtoMessage ¶
func (*UpdateSessionRequest) ProtoMessage()
func (*UpdateSessionRequest) ProtoReflect ¶
func (x *UpdateSessionRequest) ProtoReflect() protoreflect.Message
func (*UpdateSessionRequest) Reset ¶
func (x *UpdateSessionRequest) Reset()
func (*UpdateSessionRequest) String ¶
func (x *UpdateSessionRequest) String() string
type UpdateSessionStatusRequest ¶
type UpdateSessionStatusRequest struct { Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` Paused *wrapperspb.BoolValue `protobuf:"bytes,2,opt,name=paused,proto3" json:"paused,omitempty"` PausedTime *wrapperspb.StringValue `protobuf:"bytes,3,opt,name=paused_time,json=pausedTime,proto3" json:"paused_time,omitempty"` Active *wrapperspb.BoolValue `protobuf:"bytes,4,opt,name=active,proto3" json:"active,omitempty"` Finished *wrapperspb.BoolValue `protobuf:"bytes,5,opt,name=finished,proto3" json:"finished,omitempty"` StartTime string `protobuf:"bytes,6,opt,name=start_time,json=startTime,proto3" json:"start_time,omitempty"` ExpirationTime string `protobuf:"bytes,7,opt,name=expiration_time,json=expirationTime,proto3" json:"expiration_time,omitempty"` // contains filtered or unexported fields }
func (*UpdateSessionStatusRequest) Descriptor
deprecated
func (*UpdateSessionStatusRequest) Descriptor() ([]byte, []int)
Deprecated: Use UpdateSessionStatusRequest.ProtoReflect.Descriptor instead.
func (*UpdateSessionStatusRequest) GetActive ¶
func (x *UpdateSessionStatusRequest) GetActive() *wrapperspb.BoolValue
func (*UpdateSessionStatusRequest) GetExpirationTime ¶
func (x *UpdateSessionStatusRequest) GetExpirationTime() string
func (*UpdateSessionStatusRequest) GetFinished ¶
func (x *UpdateSessionStatusRequest) GetFinished() *wrapperspb.BoolValue
func (*UpdateSessionStatusRequest) GetId ¶
func (x *UpdateSessionStatusRequest) GetId() string
func (*UpdateSessionStatusRequest) GetPaused ¶
func (x *UpdateSessionStatusRequest) GetPaused() *wrapperspb.BoolValue
func (*UpdateSessionStatusRequest) GetPausedTime ¶
func (x *UpdateSessionStatusRequest) GetPausedTime() *wrapperspb.StringValue
func (*UpdateSessionStatusRequest) GetStartTime ¶
func (x *UpdateSessionStatusRequest) GetStartTime() string
func (*UpdateSessionStatusRequest) ProtoMessage ¶
func (*UpdateSessionStatusRequest) ProtoMessage()
func (*UpdateSessionStatusRequest) ProtoReflect ¶
func (x *UpdateSessionStatusRequest) ProtoReflect() protoreflect.Message
func (*UpdateSessionStatusRequest) Reset ¶
func (x *UpdateSessionStatusRequest) Reset()
func (*UpdateSessionStatusRequest) String ¶
func (x *UpdateSessionStatusRequest) String() string