unlocksvc

package
v0.0.0-...-2db35d6 Latest Latest
Warning

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

Go to latest
Published: Apr 20, 2024 License: MPL-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var File_unlocksvc_proto protoreflect.FileDescriptor
View Source
var PasswordUnlockService_ServiceDesc = grpc.ServiceDesc{
	ServiceName: "hzgllaitosunlocksvc.PasswordUnlockService",
	HandlerType: (*PasswordUnlockServiceServer)(nil),
	Methods: []grpc.MethodDesc{
		{
			MethodName: "PostUnlockIntent",
			Handler:    _PasswordUnlockService_PostUnlockIntent_Handler,
		},
		{
			MethodName: "GetUnlockPassword",
			Handler:    _PasswordUnlockService_GetUnlockPassword_Handler,
		},
	},
	Streams:  []grpc.StreamDesc{},
	Metadata: "unlocksvc/unlocksvc.proto",
}

PasswordUnlockService_ServiceDesc is the grpc.ServiceDesc for PasswordUnlockService service. It's only intended for direct use with grpc.RegisterService, and not to be introspected or modified (even as a copy)

Functions

func RegisterPasswordUnlockServiceServer

func RegisterPasswordUnlockServiceServer(s grpc.ServiceRegistrar, srv PasswordUnlockServiceServer)

Types

type GetUnlockPasswordRequest

type GetUnlockPasswordRequest struct {
	Identification *UnlockAttemptIdentification `protobuf:"bytes,1,opt,name=identification,proto3" json:"identification,omitempty"`
	// contains filtered or unexported fields
}

GetUnlockPasswordRequest provides input parameters for a program instance to obtain unlocking password a user has already offered.

func (*GetUnlockPasswordRequest) Descriptor deprecated

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

Deprecated: Use GetUnlockPasswordRequest.ProtoReflect.Descriptor instead.

func (*GetUnlockPasswordRequest) GetIdentification

func (x *GetUnlockPasswordRequest) GetIdentification() *UnlockAttemptIdentification

func (*GetUnlockPasswordRequest) ProtoMessage

func (*GetUnlockPasswordRequest) ProtoMessage()

func (*GetUnlockPasswordRequest) ProtoReflect

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

func (*GetUnlockPasswordRequest) Reset

func (x *GetUnlockPasswordRequest) Reset()

func (*GetUnlockPasswordRequest) String

func (x *GetUnlockPasswordRequest) String() string

type GetUnlockPasswordResponse

type GetUnlockPasswordResponse struct {

	// Exists is true only if a user has already offered a password for the
	// unlocking of config/data files.
	Exists bool `protobuf:"varint,1,opt,name=Exists,proto3" json:"Exists,omitempty"`
	// Password is the password string used to unlock config/data files.
	Password string `protobuf:"bytes,2,opt,name=Password,proto3" json:"Password,omitempty"`
	// contains filtered or unexported fields
}

GetUnlockPasswordRequest represents a response from obtaining the password offered by a user for unlocking config/data files.

func (*GetUnlockPasswordResponse) Descriptor deprecated

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

Deprecated: Use GetUnlockPasswordResponse.ProtoReflect.Descriptor instead.

func (*GetUnlockPasswordResponse) GetExists

func (x *GetUnlockPasswordResponse) GetExists() bool

func (*GetUnlockPasswordResponse) GetPassword

func (x *GetUnlockPasswordResponse) GetPassword() string

func (*GetUnlockPasswordResponse) ProtoMessage

func (*GetUnlockPasswordResponse) ProtoMessage()

func (*GetUnlockPasswordResponse) ProtoReflect

func (*GetUnlockPasswordResponse) Reset

func (x *GetUnlockPasswordResponse) Reset()

func (*GetUnlockPasswordResponse) String

func (x *GetUnlockPasswordResponse) String() string

type PasswordUnlockServiceClient

type PasswordUnlockServiceClient interface {
	// PostUnlockIntent registers an intent of obtaining unlocking password from a user.
	PostUnlockIntent(ctx context.Context, in *PostUnlockIntentRequest, opts ...grpc.CallOption) (*PostUnlockIntentResponse, error)
	// GetUnlockPassword retrieves an unlocking password a user has offered.
	GetUnlockPassword(ctx context.Context, in *GetUnlockPasswordRequest, opts ...grpc.CallOption) (*GetUnlockPasswordResponse, error)
}

PasswordUnlockServiceClient is the client API for PasswordUnlockService 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.

type PasswordUnlockServiceServer

type PasswordUnlockServiceServer interface {
	// PostUnlockIntent registers an intent of obtaining unlocking password from a user.
	PostUnlockIntent(context.Context, *PostUnlockIntentRequest) (*PostUnlockIntentResponse, error)
	// GetUnlockPassword retrieves an unlocking password a user has offered.
	GetUnlockPassword(context.Context, *GetUnlockPasswordRequest) (*GetUnlockPasswordResponse, error)
	// contains filtered or unexported methods
}

PasswordUnlockServiceServer is the server API for PasswordUnlockService service. All implementations must embed UnimplementedPasswordUnlockServiceServer for forward compatibility

type PostUnlockIntentRequest

type PostUnlockIntentRequest struct {
	Identification *UnlockAttemptIdentification `protobuf:"bytes,1,opt,name=identification,proto3" json:"identification,omitempty"`
	// contains filtered or unexported fields
}

PostUnlockIntentRequest provides input parameters for a program instance's intent of asking a user to provide the password for unlocking config/data files.

func (*PostUnlockIntentRequest) Descriptor deprecated

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

Deprecated: Use PostUnlockIntentRequest.ProtoReflect.Descriptor instead.

func (*PostUnlockIntentRequest) GetIdentification

func (x *PostUnlockIntentRequest) GetIdentification() *UnlockAttemptIdentification

func (*PostUnlockIntentRequest) ProtoMessage

func (*PostUnlockIntentRequest) ProtoMessage()

func (*PostUnlockIntentRequest) ProtoReflect

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

func (*PostUnlockIntentRequest) Reset

func (x *PostUnlockIntentRequest) Reset()

func (*PostUnlockIntentRequest) String

func (x *PostUnlockIntentRequest) String() string

type PostUnlockIntentResponse

type PostUnlockIntentResponse struct {
	// contains filtered or unexported fields
}

PostUnlockIntentResponse represents a response from an intent of asking a user to provide the unlocking password.

func (*PostUnlockIntentResponse) Descriptor deprecated

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

Deprecated: Use PostUnlockIntentResponse.ProtoReflect.Descriptor instead.

func (*PostUnlockIntentResponse) ProtoMessage

func (*PostUnlockIntentResponse) ProtoMessage()

func (*PostUnlockIntentResponse) ProtoReflect

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

func (*PostUnlockIntentResponse) Reset

func (x *PostUnlockIntentResponse) Reset()

func (*PostUnlockIntentResponse) String

func (x *PostUnlockIntentResponse) String() string

type UnimplementedPasswordUnlockServiceServer

type UnimplementedPasswordUnlockServiceServer struct {
}

UnimplementedPasswordUnlockServiceServer must be embedded to have forward compatible implementations.

func (UnimplementedPasswordUnlockServiceServer) GetUnlockPassword

func (UnimplementedPasswordUnlockServiceServer) PostUnlockIntent

type UnlockAttemptIdentification

type UnlockAttemptIdentification struct {

	// HostName is the name of the computer host as seen by the kernel
	// (kernel.hostname).
	HostName string `protobuf:"bytes,1,opt,name=HostName,proto3" json:"HostName,omitempty"`
	// PID is the program process ID.
	PID uint64 `protobuf:"varint,2,opt,name=PID,proto3" json:"PID,omitempty"`
	// RandomChallenge is a string of random characters generated when the program
	// instance starts up. The string acts as a disposable secret to identify this
	// program instance.
	RandomChallenge string `protobuf:"bytes,3,opt,name=RandomChallenge,proto3" json:"RandomChallenge,omitempty"`
	// UserID is the ID of the OS user that laitos process runs as.
	UserID uint64 `protobuf:"varint,4,opt,name=UserID,proto3" json:"UserID,omitempty"`
	// UptimeSec is the uptime (in seconds) of the host OS.
	UptimeSec uint64 `protobuf:"varint,5,opt,name=UptimeSec,proto3" json:"UptimeSec,omitempty"`
	// GOOS is the identifier of the host OS.
	GOOS string `protobuf:"bytes,6,opt,name=GOOS,proto3" json:"GOOS,omitempty"`
	// GOARCH is the architecture of the host OS.
	GOARCH string `protobuf:"bytes,7,opt,name=GOARCH,proto3" json:"GOARCH,omitempty"`
	// SystemLoad is the system load (Linux specific) string.
	SystemLoad string `protobuf:"bytes,8,opt,name=SystemLoad,proto3" json:"SystemLoad,omitempty"`
	// contains filtered or unexported fields
}

UnlockAttemptIdentification encapsulates identification properties of a program instance (the config/data files of which are currently password-locked) along with properties of its computer host.

func (*UnlockAttemptIdentification) Descriptor deprecated

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

Deprecated: Use UnlockAttemptIdentification.ProtoReflect.Descriptor instead.

func (*UnlockAttemptIdentification) GetGOARCH

func (x *UnlockAttemptIdentification) GetGOARCH() string

func (*UnlockAttemptIdentification) GetGOOS

func (x *UnlockAttemptIdentification) GetGOOS() string

func (*UnlockAttemptIdentification) GetHostName

func (x *UnlockAttemptIdentification) GetHostName() string

func (*UnlockAttemptIdentification) GetPID

func (x *UnlockAttemptIdentification) GetPID() uint64

func (*UnlockAttemptIdentification) GetRandomChallenge

func (x *UnlockAttemptIdentification) GetRandomChallenge() string

func (*UnlockAttemptIdentification) GetSystemLoad

func (x *UnlockAttemptIdentification) GetSystemLoad() string

func (*UnlockAttemptIdentification) GetUptimeSec

func (x *UnlockAttemptIdentification) GetUptimeSec() uint64

func (*UnlockAttemptIdentification) GetUserID

func (x *UnlockAttemptIdentification) GetUserID() uint64

func (*UnlockAttemptIdentification) ProtoMessage

func (*UnlockAttemptIdentification) ProtoMessage()

func (*UnlockAttemptIdentification) ProtoReflect

func (*UnlockAttemptIdentification) Reset

func (x *UnlockAttemptIdentification) Reset()

func (*UnlockAttemptIdentification) String

func (x *UnlockAttemptIdentification) String() string

type UnsafePasswordUnlockServiceServer

type UnsafePasswordUnlockServiceServer interface {
	// contains filtered or unexported methods
}

UnsafePasswordUnlockServiceServer may be embedded to opt out of forward compatibility for this service. Use of this interface is not recommended, as added methods to PasswordUnlockServiceServer will result in compilation errors.

Jump to

Keyboard shortcuts

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