Documentation ¶
Index ¶
- Variables
- func RegisterAdminServiceServer(s grpc.ServiceRegistrar, srv AdminServiceServer)
- func StartServer(a *api.API) error
- type AdminServiceClient
- type AdminServiceServer
- type CreateMachineRequest
- func (*CreateMachineRequest) Descriptor() ([]byte, []int)deprecated
- func (x *CreateMachineRequest) GetEmail() string
- func (x *CreateMachineRequest) GetRoles() []string
- func (x *CreateMachineRequest) GetSessionToken() string
- func (*CreateMachineRequest) ProtoMessage()
- func (x *CreateMachineRequest) ProtoReflect() protoreflect.Message
- func (x *CreateMachineRequest) Reset()
- func (x *CreateMachineRequest) String() string
- type CreateMachineResponse
- func (*CreateMachineResponse) Descriptor() ([]byte, []int)deprecated
- func (x *CreateMachineResponse) GetMachineId() string
- func (*CreateMachineResponse) ProtoMessage()
- func (x *CreateMachineResponse) ProtoReflect() protoreflect.Message
- func (x *CreateMachineResponse) Reset()
- func (x *CreateMachineResponse) String() string
- type InitMachineSessionRequest
- func (*InitMachineSessionRequest) Descriptor() ([]byte, []int)deprecated
- func (x *InitMachineSessionRequest) GetAllowedIps() []string
- func (x *InitMachineSessionRequest) GetMachineId() string
- func (x *InitMachineSessionRequest) GetSessionToken() string
- func (*InitMachineSessionRequest) ProtoMessage()
- func (x *InitMachineSessionRequest) ProtoReflect() protoreflect.Message
- func (x *InitMachineSessionRequest) Reset()
- func (x *InitMachineSessionRequest) String() string
- type InitMachineSessionResponse
- func (*InitMachineSessionResponse) Descriptor() ([]byte, []int)deprecated
- func (x *InitMachineSessionResponse) GetMachineId() string
- func (x *InitMachineSessionResponse) GetSecret() []byte
- func (x *InitMachineSessionResponse) GetSessionId() string
- func (x *InitMachineSessionResponse) GetSubject() string
- func (*InitMachineSessionResponse) ProtoMessage()
- func (x *InitMachineSessionResponse) ProtoReflect() protoreflect.Message
- func (x *InitMachineSessionResponse) Reset()
- func (x *InitMachineSessionResponse) String() string
- type LoginConfirmRequest
- func (*LoginConfirmRequest) Descriptor() ([]byte, []int)deprecated
- func (x *LoginConfirmRequest) GetTotpCode() string
- func (x *LoginConfirmRequest) GetTotpToken() string
- func (*LoginConfirmRequest) ProtoMessage()
- func (x *LoginConfirmRequest) ProtoReflect() protoreflect.Message
- func (x *LoginConfirmRequest) Reset()
- func (x *LoginConfirmRequest) String() string
- type LoginConfirmResponse
- func (*LoginConfirmResponse) Descriptor() ([]byte, []int)deprecated
- func (x *LoginConfirmResponse) GetSessionToken() string
- func (*LoginConfirmResponse) ProtoMessage()
- func (x *LoginConfirmResponse) ProtoReflect() protoreflect.Message
- func (x *LoginConfirmResponse) Reset()
- func (x *LoginConfirmResponse) String() string
- type LoginRequest
- func (*LoginRequest) Descriptor() ([]byte, []int)deprecated
- func (x *LoginRequest) GetEmail() string
- func (x *LoginRequest) GetPassword() string
- func (*LoginRequest) ProtoMessage()
- func (x *LoginRequest) ProtoReflect() protoreflect.Message
- func (x *LoginRequest) Reset()
- func (x *LoginRequest) String() string
- type LoginResponse
- func (*LoginResponse) Descriptor() ([]byte, []int)deprecated
- func (x *LoginResponse) GetTotpToken() string
- func (x *LoginResponse) GetTotpUri() string
- func (*LoginResponse) ProtoMessage()
- func (x *LoginResponse) ProtoReflect() protoreflect.Message
- func (x *LoginResponse) Reset()
- func (x *LoginResponse) String() string
- type LogoutRequest
- type LogoutResponse
- func (*LogoutResponse) Descriptor() ([]byte, []int)deprecated
- func (x *LogoutResponse) GetId() string
- func (x *LogoutResponse) GetSessionId() string
- func (*LogoutResponse) ProtoMessage()
- func (x *LogoutResponse) ProtoReflect() protoreflect.Message
- func (x *LogoutResponse) Reset()
- func (x *LogoutResponse) String() string
- type UnimplementedAdminServiceServer
- func (UnimplementedAdminServiceServer) CreateMachine(context.Context, *CreateMachineRequest) (*CreateMachineResponse, error)
- func (UnimplementedAdminServiceServer) InitMachineSession(context.Context, *InitMachineSessionRequest) (*InitMachineSessionResponse, error)
- func (UnimplementedAdminServiceServer) Login(context.Context, *LoginRequest) (*LoginResponse, error)
- func (UnimplementedAdminServiceServer) LoginConfirm(context.Context, *LoginConfirmRequest) (*LoginConfirmResponse, error)
- func (UnimplementedAdminServiceServer) Logout(context.Context, *LogoutRequest) (*LogoutResponse, error)
- type UnsafeAdminServiceServer
Constants ¶
This section is empty.
Variables ¶
var AdminService_ServiceDesc = grpc.ServiceDesc{ ServiceName: "admingrpc.AdminService", HandlerType: (*AdminServiceServer)(nil), Methods: []grpc.MethodDesc{ { MethodName: "Login", Handler: _AdminService_Login_Handler, }, { MethodName: "LoginConfirm", Handler: _AdminService_LoginConfirm_Handler, }, { MethodName: "Logout", Handler: _AdminService_Logout_Handler, }, { MethodName: "CreateMachine", Handler: _AdminService_CreateMachine_Handler, }, { MethodName: "InitMachineSession", Handler: _AdminService_InitMachineSession_Handler, }, }, Streams: []grpc.StreamDesc{}, Metadata: "admingrpc.proto", }
AdminService_ServiceDesc is the grpc.ServiceDesc for AdminService service. It's only intended for direct use with grpc.RegisterService, and not to be introspected or modified (even as a copy)
var File_admingrpc_proto protoreflect.FileDescriptor
Functions ¶
func RegisterAdminServiceServer ¶
func RegisterAdminServiceServer(s grpc.ServiceRegistrar, srv AdminServiceServer)
func StartServer ¶
Types ¶
type AdminServiceClient ¶
type AdminServiceClient interface { Login(ctx context.Context, in *LoginRequest, opts ...grpc.CallOption) (*LoginResponse, error) LoginConfirm(ctx context.Context, in *LoginConfirmRequest, opts ...grpc.CallOption) (*LoginConfirmResponse, error) Logout(ctx context.Context, in *LogoutRequest, opts ...grpc.CallOption) (*LogoutResponse, error) CreateMachine(ctx context.Context, in *CreateMachineRequest, opts ...grpc.CallOption) (*CreateMachineResponse, error) InitMachineSession(ctx context.Context, in *InitMachineSessionRequest, opts ...grpc.CallOption) (*InitMachineSessionResponse, error) }
AdminServiceClient is the client API for AdminService 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 NewAdminServiceClient ¶
func NewAdminServiceClient(cc grpc.ClientConnInterface) AdminServiceClient
type AdminServiceServer ¶
type AdminServiceServer interface { Login(context.Context, *LoginRequest) (*LoginResponse, error) LoginConfirm(context.Context, *LoginConfirmRequest) (*LoginConfirmResponse, error) Logout(context.Context, *LogoutRequest) (*LogoutResponse, error) CreateMachine(context.Context, *CreateMachineRequest) (*CreateMachineResponse, error) InitMachineSession(context.Context, *InitMachineSessionRequest) (*InitMachineSessionResponse, error) // contains filtered or unexported methods }
AdminServiceServer is the server API for AdminService service. All implementations must embed UnimplementedAdminServiceServer for forward compatibility
type CreateMachineRequest ¶
type CreateMachineRequest struct { SessionToken string `protobuf:"bytes,1,opt,name=sessionToken,proto3" json:"sessionToken,omitempty"` Email string `protobuf:"bytes,2,opt,name=email,proto3" json:"email,omitempty"` Roles []string `protobuf:"bytes,3,rep,name=roles,proto3" json:"roles,omitempty"` // contains filtered or unexported fields }
func (*CreateMachineRequest) Descriptor
deprecated
func (*CreateMachineRequest) Descriptor() ([]byte, []int)
Deprecated: Use CreateMachineRequest.ProtoReflect.Descriptor instead.
func (*CreateMachineRequest) GetEmail ¶
func (x *CreateMachineRequest) GetEmail() string
func (*CreateMachineRequest) GetRoles ¶
func (x *CreateMachineRequest) GetRoles() []string
func (*CreateMachineRequest) GetSessionToken ¶
func (x *CreateMachineRequest) GetSessionToken() string
func (*CreateMachineRequest) ProtoMessage ¶
func (*CreateMachineRequest) ProtoMessage()
func (*CreateMachineRequest) ProtoReflect ¶
func (x *CreateMachineRequest) ProtoReflect() protoreflect.Message
func (*CreateMachineRequest) Reset ¶
func (x *CreateMachineRequest) Reset()
func (*CreateMachineRequest) String ¶
func (x *CreateMachineRequest) String() string
type CreateMachineResponse ¶
type CreateMachineResponse struct { MachineId string `protobuf:"bytes,1,opt,name=machineId,proto3" json:"machineId,omitempty"` // contains filtered or unexported fields }
func (*CreateMachineResponse) Descriptor
deprecated
func (*CreateMachineResponse) Descriptor() ([]byte, []int)
Deprecated: Use CreateMachineResponse.ProtoReflect.Descriptor instead.
func (*CreateMachineResponse) GetMachineId ¶
func (x *CreateMachineResponse) GetMachineId() string
func (*CreateMachineResponse) ProtoMessage ¶
func (*CreateMachineResponse) ProtoMessage()
func (*CreateMachineResponse) ProtoReflect ¶
func (x *CreateMachineResponse) ProtoReflect() protoreflect.Message
func (*CreateMachineResponse) Reset ¶
func (x *CreateMachineResponse) Reset()
func (*CreateMachineResponse) String ¶
func (x *CreateMachineResponse) String() string
type InitMachineSessionRequest ¶
type InitMachineSessionRequest struct { SessionToken string `protobuf:"bytes,1,opt,name=sessionToken,proto3" json:"sessionToken,omitempty"` MachineId string `protobuf:"bytes,2,opt,name=machineId,proto3" json:"machineId,omitempty"` AllowedIps []string `protobuf:"bytes,3,rep,name=allowedIps,proto3" json:"allowedIps,omitempty"` // contains filtered or unexported fields }
func (*InitMachineSessionRequest) Descriptor
deprecated
func (*InitMachineSessionRequest) Descriptor() ([]byte, []int)
Deprecated: Use InitMachineSessionRequest.ProtoReflect.Descriptor instead.
func (*InitMachineSessionRequest) GetAllowedIps ¶
func (x *InitMachineSessionRequest) GetAllowedIps() []string
func (*InitMachineSessionRequest) GetMachineId ¶
func (x *InitMachineSessionRequest) GetMachineId() string
func (*InitMachineSessionRequest) GetSessionToken ¶
func (x *InitMachineSessionRequest) GetSessionToken() string
func (*InitMachineSessionRequest) ProtoMessage ¶
func (*InitMachineSessionRequest) ProtoMessage()
func (*InitMachineSessionRequest) ProtoReflect ¶
func (x *InitMachineSessionRequest) ProtoReflect() protoreflect.Message
func (*InitMachineSessionRequest) Reset ¶
func (x *InitMachineSessionRequest) Reset()
func (*InitMachineSessionRequest) String ¶
func (x *InitMachineSessionRequest) String() string
type InitMachineSessionResponse ¶
type InitMachineSessionResponse struct { MachineId string `protobuf:"bytes,1,opt,name=machineId,proto3" json:"machineId,omitempty"` SessionId string `protobuf:"bytes,2,opt,name=sessionId,proto3" json:"sessionId,omitempty"` Subject string `protobuf:"bytes,3,opt,name=subject,proto3" json:"subject,omitempty"` Secret []byte `protobuf:"bytes,4,opt,name=secret,proto3" json:"secret,omitempty"` // contains filtered or unexported fields }
func (*InitMachineSessionResponse) Descriptor
deprecated
func (*InitMachineSessionResponse) Descriptor() ([]byte, []int)
Deprecated: Use InitMachineSessionResponse.ProtoReflect.Descriptor instead.
func (*InitMachineSessionResponse) GetMachineId ¶
func (x *InitMachineSessionResponse) GetMachineId() string
func (*InitMachineSessionResponse) GetSecret ¶
func (x *InitMachineSessionResponse) GetSecret() []byte
func (*InitMachineSessionResponse) GetSessionId ¶
func (x *InitMachineSessionResponse) GetSessionId() string
func (*InitMachineSessionResponse) GetSubject ¶
func (x *InitMachineSessionResponse) GetSubject() string
func (*InitMachineSessionResponse) ProtoMessage ¶
func (*InitMachineSessionResponse) ProtoMessage()
func (*InitMachineSessionResponse) ProtoReflect ¶
func (x *InitMachineSessionResponse) ProtoReflect() protoreflect.Message
func (*InitMachineSessionResponse) Reset ¶
func (x *InitMachineSessionResponse) Reset()
func (*InitMachineSessionResponse) String ¶
func (x *InitMachineSessionResponse) String() string
type LoginConfirmRequest ¶
type LoginConfirmRequest struct { TotpToken string `protobuf:"bytes,1,opt,name=totpToken,proto3" json:"totpToken,omitempty"` TotpCode string `protobuf:"bytes,2,opt,name=totpCode,proto3" json:"totpCode,omitempty"` // contains filtered or unexported fields }
func (*LoginConfirmRequest) Descriptor
deprecated
func (*LoginConfirmRequest) Descriptor() ([]byte, []int)
Deprecated: Use LoginConfirmRequest.ProtoReflect.Descriptor instead.
func (*LoginConfirmRequest) GetTotpCode ¶
func (x *LoginConfirmRequest) GetTotpCode() string
func (*LoginConfirmRequest) GetTotpToken ¶
func (x *LoginConfirmRequest) GetTotpToken() string
func (*LoginConfirmRequest) ProtoMessage ¶
func (*LoginConfirmRequest) ProtoMessage()
func (*LoginConfirmRequest) ProtoReflect ¶
func (x *LoginConfirmRequest) ProtoReflect() protoreflect.Message
func (*LoginConfirmRequest) Reset ¶
func (x *LoginConfirmRequest) Reset()
func (*LoginConfirmRequest) String ¶
func (x *LoginConfirmRequest) String() string
type LoginConfirmResponse ¶
type LoginConfirmResponse struct { SessionToken string `protobuf:"bytes,1,opt,name=sessionToken,proto3" json:"sessionToken,omitempty"` // contains filtered or unexported fields }
func (*LoginConfirmResponse) Descriptor
deprecated
func (*LoginConfirmResponse) Descriptor() ([]byte, []int)
Deprecated: Use LoginConfirmResponse.ProtoReflect.Descriptor instead.
func (*LoginConfirmResponse) GetSessionToken ¶
func (x *LoginConfirmResponse) GetSessionToken() string
func (*LoginConfirmResponse) ProtoMessage ¶
func (*LoginConfirmResponse) ProtoMessage()
func (*LoginConfirmResponse) ProtoReflect ¶
func (x *LoginConfirmResponse) ProtoReflect() protoreflect.Message
func (*LoginConfirmResponse) Reset ¶
func (x *LoginConfirmResponse) Reset()
func (*LoginConfirmResponse) String ¶
func (x *LoginConfirmResponse) String() string
type LoginRequest ¶
type LoginRequest struct { Email string `protobuf:"bytes,1,opt,name=email,proto3" json:"email,omitempty"` Password string `protobuf:"bytes,2,opt,name=password,proto3" json:"password,omitempty"` // contains filtered or unexported fields }
func (*LoginRequest) Descriptor
deprecated
func (*LoginRequest) Descriptor() ([]byte, []int)
Deprecated: Use LoginRequest.ProtoReflect.Descriptor instead.
func (*LoginRequest) GetEmail ¶
func (x *LoginRequest) GetEmail() string
func (*LoginRequest) GetPassword ¶
func (x *LoginRequest) GetPassword() string
func (*LoginRequest) ProtoMessage ¶
func (*LoginRequest) ProtoMessage()
func (*LoginRequest) ProtoReflect ¶
func (x *LoginRequest) ProtoReflect() protoreflect.Message
func (*LoginRequest) Reset ¶
func (x *LoginRequest) Reset()
func (*LoginRequest) String ¶
func (x *LoginRequest) String() string
type LoginResponse ¶
type LoginResponse struct { TotpToken string `protobuf:"bytes,1,opt,name=totpToken,proto3" json:"totpToken,omitempty"` TotpUri string `protobuf:"bytes,2,opt,name=totpUri,proto3" json:"totpUri,omitempty"` // contains filtered or unexported fields }
func (*LoginResponse) Descriptor
deprecated
func (*LoginResponse) Descriptor() ([]byte, []int)
Deprecated: Use LoginResponse.ProtoReflect.Descriptor instead.
func (*LoginResponse) GetTotpToken ¶
func (x *LoginResponse) GetTotpToken() string
func (*LoginResponse) GetTotpUri ¶
func (x *LoginResponse) GetTotpUri() string
func (*LoginResponse) ProtoMessage ¶
func (*LoginResponse) ProtoMessage()
func (*LoginResponse) ProtoReflect ¶
func (x *LoginResponse) ProtoReflect() protoreflect.Message
func (*LoginResponse) Reset ¶
func (x *LoginResponse) Reset()
func (*LoginResponse) String ¶
func (x *LoginResponse) String() string
type LogoutRequest ¶
type LogoutRequest struct { SessionToken string `protobuf:"bytes,1,opt,name=sessionToken,proto3" json:"sessionToken,omitempty"` // contains filtered or unexported fields }
func (*LogoutRequest) Descriptor
deprecated
func (*LogoutRequest) Descriptor() ([]byte, []int)
Deprecated: Use LogoutRequest.ProtoReflect.Descriptor instead.
func (*LogoutRequest) GetSessionToken ¶
func (x *LogoutRequest) GetSessionToken() string
func (*LogoutRequest) ProtoMessage ¶
func (*LogoutRequest) ProtoMessage()
func (*LogoutRequest) ProtoReflect ¶
func (x *LogoutRequest) ProtoReflect() protoreflect.Message
func (*LogoutRequest) Reset ¶
func (x *LogoutRequest) Reset()
func (*LogoutRequest) String ¶
func (x *LogoutRequest) String() string
type LogoutResponse ¶
type LogoutResponse struct { Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` SessionId string `protobuf:"bytes,2,opt,name=sessionId,proto3" json:"sessionId,omitempty"` // contains filtered or unexported fields }
func (*LogoutResponse) Descriptor
deprecated
func (*LogoutResponse) Descriptor() ([]byte, []int)
Deprecated: Use LogoutResponse.ProtoReflect.Descriptor instead.
func (*LogoutResponse) GetId ¶
func (x *LogoutResponse) GetId() string
func (*LogoutResponse) GetSessionId ¶
func (x *LogoutResponse) GetSessionId() string
func (*LogoutResponse) ProtoMessage ¶
func (*LogoutResponse) ProtoMessage()
func (*LogoutResponse) ProtoReflect ¶
func (x *LogoutResponse) ProtoReflect() protoreflect.Message
func (*LogoutResponse) Reset ¶
func (x *LogoutResponse) Reset()
func (*LogoutResponse) String ¶
func (x *LogoutResponse) String() string
type UnimplementedAdminServiceServer ¶
type UnimplementedAdminServiceServer struct { }
UnimplementedAdminServiceServer must be embedded to have forward compatible implementations.
func (UnimplementedAdminServiceServer) CreateMachine ¶
func (UnimplementedAdminServiceServer) CreateMachine(context.Context, *CreateMachineRequest) (*CreateMachineResponse, error)
func (UnimplementedAdminServiceServer) InitMachineSession ¶
func (UnimplementedAdminServiceServer) InitMachineSession(context.Context, *InitMachineSessionRequest) (*InitMachineSessionResponse, error)
func (UnimplementedAdminServiceServer) Login ¶
func (UnimplementedAdminServiceServer) Login(context.Context, *LoginRequest) (*LoginResponse, error)
func (UnimplementedAdminServiceServer) LoginConfirm ¶
func (UnimplementedAdminServiceServer) LoginConfirm(context.Context, *LoginConfirmRequest) (*LoginConfirmResponse, error)
func (UnimplementedAdminServiceServer) Logout ¶
func (UnimplementedAdminServiceServer) Logout(context.Context, *LogoutRequest) (*LogoutResponse, error)
type UnsafeAdminServiceServer ¶
type UnsafeAdminServiceServer interface {
// contains filtered or unexported methods
}
UnsafeAdminServiceServer may be embedded to opt out of forward compatibility for this service. Use of this interface is not recommended, as added methods to AdminServiceServer will result in compilation errors.