sessionpb

package
v3.2.0 Latest Latest
Warning

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

Go to latest
Published: Jun 21, 2024 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

View Source
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

View Source
var File_session_session_proto protoreflect.FileDescriptor
View Source
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) Descriptor() ([]byte, []int)

Deprecated: Use Session.ProtoReflect.Descriptor instead.

func (*Session) GetAccessCode

func (x *Session) GetAccessCode() string

func (*Session) GetCourse

func (x *Session) GetCourse() string

func (*Session) GetId

func (x *Session) GetId() string

func (*Session) GetKeepCourseVm

func (x *Session) GetKeepCourseVm() bool

func (*Session) GetLabels

func (x *Session) GetLabels() map[string]string

func (*Session) GetScenario

func (x *Session) GetScenario() string

func (*Session) GetStatus

func (x *Session) GetStatus() *SessionStatus

func (*Session) GetUid

func (x *Session) GetUid() string

func (*Session) GetUser

func (x *Session) GetUser() string

func (*Session) GetVmClaim

func (x *Session) GetVmClaim() []string

func (*Session) ProtoMessage

func (*Session) ProtoMessage()

func (*Session) ProtoReflect

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

func (*Session) Reset

func (x *Session) Reset()

func (*Session) String

func (x *Session) String() string

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

func (UnimplementedSessionSvcServer) DeleteSession

func (UnimplementedSessionSvcServer) GetSession

func (UnimplementedSessionSvcServer) ListSession

func (UnimplementedSessionSvcServer) UpdateSession

func (UnimplementedSessionSvcServer) UpdateSessionStatus

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 (*UpdateSessionStatusRequest) GetExpirationTime

func (x *UpdateSessionStatusRequest) GetExpirationTime() string

func (*UpdateSessionStatusRequest) GetFinished

func (*UpdateSessionStatusRequest) GetId

func (*UpdateSessionStatusRequest) GetPaused

func (*UpdateSessionStatusRequest) GetPausedTime

func (*UpdateSessionStatusRequest) GetStartTime

func (x *UpdateSessionStatusRequest) GetStartTime() string

func (*UpdateSessionStatusRequest) ProtoMessage

func (*UpdateSessionStatusRequest) ProtoMessage()

func (*UpdateSessionStatusRequest) ProtoReflect

func (*UpdateSessionStatusRequest) Reset

func (x *UpdateSessionStatusRequest) Reset()

func (*UpdateSessionStatusRequest) String

func (x *UpdateSessionStatusRequest) String() string

Jump to

Keyboard shortcuts

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