lanirpc

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Oct 13, 2022 License: BSD-3-Clause Imports: 24 Imported by: 0

Documentation

Overview

Package lanirpc is a reverse proxy.

It translates gRPC into RESTful JSON APIs.

Package lanirpc is a reverse proxy.

It translates gRPC into RESTful JSON APIs.

Package lanirpc is a reverse proxy.

It translates gRPC into RESTful JSON APIs.

Package lanirpc is a reverse proxy.

It translates gRPC into RESTful JSON APIs.

Index

Constants

View Source
const (
	MethodOverrideParam        = "method"
	HeaderWebSocketProtocol    = "Sec-Websocket-Protocol"
	WebSocketProtocolDelimiter = "+"
	PingContent                = "are you there?"
)

Variables

View Source
var (
	HealthUpdate_HealthState_name = map[int32]string{
		0: "UNKNOWN",
		1: "SERVING",
		2: "NOT_SERVING",
		3: "SERVICE_UNKNOWN",
	}
	HealthUpdate_HealthState_value = map[string]int32{
		"UNKNOWN":         0,
		"SERVING":         1,
		"NOT_SERVING":     2,
		"SERVICE_UNKNOWN": 3,
	}
)

Enum value maps for HealthUpdate_HealthState.

View Source
var (
	TimeoutType_name = map[int32]string{
		0: "SECOND",
		1: "MINUTE",
		2: "HOUR",
		3: "DAY",
	}
	TimeoutType_value = map[string]int32{
		"SECOND": 0,
		"MINUTE": 1,
		"HOUR":   2,
		"DAY":    3,
	}
)

Enum value maps for TimeoutType.

View Source
var (
	PluginState_name = map[int32]string{
		0: "READY",
		1: "BUSY",
		2: "STOPPING",
		3: "STOPPED",
		4: "UNKNOWN",
		5: "UNRESPONSIVE",
		6: "KILLED",
	}
	PluginState_value = map[string]int32{
		"READY":        0,
		"BUSY":         1,
		"STOPPING":     2,
		"STOPPED":      3,
		"UNKNOWN":      4,
		"UNRESPONSIVE": 5,
		"KILLED":       6,
	}
)

Enum value maps for PluginState.

View Source
var (
	Plugin_PluginType_name = map[int32]string{
		0: "DATASOURCE",
		1: "CONTROLLER",
	}
	Plugin_PluginType_value = map[string]int32{
		"DATASOURCE": 0,
		"CONTROLLER": 1,
	}
)

Enum value maps for Plugin_PluginType.

View Source
var File_health_proto protoreflect.FileDescriptor
View Source
var File_pluginapi_proto protoreflect.FileDescriptor
View Source
var File_unlocker_proto protoreflect.FileDescriptor
View Source
var Health_ServiceDesc = grpc.ServiceDesc{
	ServiceName: "lanirpc.Health",
	HandlerType: (*HealthServer)(nil),
	Methods: []grpc.MethodDesc{
		{
			MethodName: "Check",
			Handler:    _Health_Check_Handler,
		},
	},
	Streams:  []grpc.StreamDesc{},
	Metadata: "health.proto",
}

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

View Source
var (
	LaniCLientStreamingURIs = []*regexp.Regexp{}
)
View Source
var Lani_ServiceDesc = grpc.ServiceDesc{
	ServiceName: "lanirpc.Lani",
	HandlerType: (*LaniServer)(nil),
	Methods: []grpc.MethodDesc{
		{
			MethodName: "StopDaemon",
			Handler:    _Lani_StopDaemon_Handler,
		},
		{
			MethodName: "AdminTest",
			Handler:    _Lani_AdminTest_Handler,
		},
		{
			MethodName: "TestCommand",
			Handler:    _Lani_TestCommand_Handler,
		},
		{
			MethodName: "BakeMacaroon",
			Handler:    _Lani_BakeMacaroon_Handler,
		},
		{
			MethodName: "SetTemperature",
			Handler:    _Lani_SetTemperature_Handler,
		},
		{
			MethodName: "SetPressure",
			Handler:    _Lani_SetPressure_Handler,
		},
		{
			MethodName: "StartRecording",
			Handler:    _Lani_StartRecording_Handler,
		},
		{
			MethodName: "StopRecording",
			Handler:    _Lani_StopRecording_Handler,
		},
		{
			MethodName: "SubscribeDataStream",
			Handler:    _Lani_SubscribeDataStream_Handler,
		},
		{
			MethodName: "LoadTestPlan",
			Handler:    _Lani_LoadTestPlan_Handler,
		},
		{
			MethodName: "StartTestPlan",
			Handler:    _Lani_StartTestPlan_Handler,
		},
		{
			MethodName: "StopTestPlan",
			Handler:    _Lani_StopTestPlan_Handler,
		},
		{
			MethodName: "InsertROIMarker",
			Handler:    _Lani_InsertROIMarker_Handler,
		},
	},
	Streams:  []grpc.StreamDesc{},
	Metadata: "lani.proto",
}

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

View Source
var PluginAPI_ServiceDesc = grpc.ServiceDesc{
	ServiceName: "lanirpc.PluginAPI",
	HandlerType: (*PluginAPIServer)(nil),
	Methods: []grpc.MethodDesc{
		{
			MethodName: "StartRecord",
			Handler:    _PluginAPI_StartRecord_Handler,
		},
		{
			MethodName: "StopRecord",
			Handler:    _PluginAPI_StopRecord_Handler,
		},
		{
			MethodName: "StartPlugin",
			Handler:    _PluginAPI_StartPlugin_Handler,
		},
		{
			MethodName: "StopPlugin",
			Handler:    _PluginAPI_StopPlugin_Handler,
		},
		{
			MethodName: "ListPlugins",
			Handler:    _PluginAPI_ListPlugins_Handler,
		},
		{
			MethodName: "AddPlugin",
			Handler:    _PluginAPI_AddPlugin_Handler,
		},
		{
			MethodName: "GetPlugin",
			Handler:    _PluginAPI_GetPlugin_Handler,
		},
	},
	Streams: []grpc.StreamDesc{
		{
			StreamName:    "Subscribe",
			Handler:       _PluginAPI_Subscribe_Handler,
			ServerStreams: true,
		},
		{
			StreamName:    "Command",
			Handler:       _PluginAPI_Command_Handler,
			ServerStreams: true,
		},
		{
			StreamName:    "SubscribePluginState",
			Handler:       _PluginAPI_SubscribePluginState_Handler,
			ServerStreams: true,
		},
	},
	Metadata: "pluginapi.proto",
}

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

View Source
var Unlocker_ServiceDesc = grpc.ServiceDesc{
	ServiceName: "lanirpc.Unlocker",
	HandlerType: (*UnlockerServer)(nil),
	Methods: []grpc.MethodDesc{
		{
			MethodName: "Login",
			Handler:    _Unlocker_Login_Handler,
		},
		{
			MethodName: "SetPassword",
			Handler:    _Unlocker_SetPassword_Handler,
		},
		{
			MethodName: "ChangePassword",
			Handler:    _Unlocker_ChangePassword_Handler,
		},
	},
	Streams:  []grpc.StreamDesc{},
	Metadata: "unlocker.proto",
}

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

Functions

func IsClosedConnError

func IsClosedConnError(err error) bool

IsClosedConnError is a helper function that returns true if the given error is an error indicating we are using a closed connection.

func NewWebSocketProxy

func NewWebSocketProxy(h http.Handler, logger *zerolog.Logger, pingInterval, pongWait time.Duration) http.Handler

NewWebSocketProxy attempts to expose the underlying handler as a response- streaming WebSocket stream with newline-delimited JSON as the content encoding. If pingInterval is a non-zero duration, a ping message will be sent out periodically and a pong response message is expected from the client. The clientStreamingURIs parameter can hold a list of all patterns for URIs that are mapped to client-streaming RPC methods. We need to keep track of those to make sure we initialize the request body correctly for the underlying grpc-gateway library.

func RegisterHealthHandler

func RegisterHealthHandler(ctx context.Context, mux *runtime.ServeMux, conn *grpc.ClientConn) error

RegisterHealthHandler registers the http handlers for service Health to "mux". The handlers forward requests to the grpc endpoint over "conn".

func RegisterHealthHandlerClient

func RegisterHealthHandlerClient(ctx context.Context, mux *runtime.ServeMux, client HealthClient) error

RegisterHealthHandlerClient registers the http handlers for service Health to "mux". The handlers forward requests to the grpc endpoint over the given implementation of "HealthClient". Note: the gRPC framework executes interceptors within the gRPC handler. If the passed in "HealthClient" doesn't go through the normal gRPC flow (creating a gRPC client etc.) then it will be up to the passed in "HealthClient" to call the correct interceptors.

func RegisterHealthHandlerFromEndpoint

func RegisterHealthHandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, opts []grpc.DialOption) (err error)

RegisterHealthHandlerFromEndpoint is same as RegisterHealthHandler but automatically dials to "endpoint" and closes the connection when "ctx" gets done.

func RegisterHealthHandlerServer

func RegisterHealthHandlerServer(ctx context.Context, mux *runtime.ServeMux, server HealthServer) error

RegisterHealthHandlerServer registers the http handlers for service Health to "mux". UnaryRPC :call HealthServer directly. StreamingRPC :currently unsupported pending https://github.com/grpc/grpc-go/issues/906. Note that using this registration option will cause many gRPC library features to stop working. Consider using RegisterHealthHandlerFromEndpoint instead.

func RegisterHealthServer

func RegisterHealthServer(s grpc.ServiceRegistrar, srv HealthServer)

func RegisterLaniHandler

func RegisterLaniHandler(ctx context.Context, mux *runtime.ServeMux, conn *grpc.ClientConn) error

RegisterLaniHandler registers the http handlers for service Lani to "mux". The handlers forward requests to the grpc endpoint over "conn".

func RegisterLaniHandlerClient

func RegisterLaniHandlerClient(ctx context.Context, mux *runtime.ServeMux, client LaniClient) error

RegisterLaniHandlerClient registers the http handlers for service Lani to "mux". The handlers forward requests to the grpc endpoint over the given implementation of "LaniClient". Note: the gRPC framework executes interceptors within the gRPC handler. If the passed in "LaniClient" doesn't go through the normal gRPC flow (creating a gRPC client etc.) then it will be up to the passed in "LaniClient" to call the correct interceptors.

func RegisterLaniHandlerFromEndpoint

func RegisterLaniHandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, opts []grpc.DialOption) (err error)

RegisterLaniHandlerFromEndpoint is same as RegisterLaniHandler but automatically dials to "endpoint" and closes the connection when "ctx" gets done.

func RegisterLaniHandlerServer

func RegisterLaniHandlerServer(ctx context.Context, mux *runtime.ServeMux, server LaniServer) error

RegisterLaniHandlerServer registers the http handlers for service Lani to "mux". UnaryRPC :call LaniServer directly. StreamingRPC :currently unsupported pending https://github.com/grpc/grpc-go/issues/906. Note that using this registration option will cause many gRPC library features to stop working. Consider using RegisterLaniHandlerFromEndpoint instead.

func RegisterLaniServer

func RegisterLaniServer(s grpc.ServiceRegistrar, srv LaniServer)

func RegisterPluginAPIHandler

func RegisterPluginAPIHandler(ctx context.Context, mux *runtime.ServeMux, conn *grpc.ClientConn) error

RegisterPluginAPIHandler registers the http handlers for service PluginAPI to "mux". The handlers forward requests to the grpc endpoint over "conn".

func RegisterPluginAPIHandlerClient

func RegisterPluginAPIHandlerClient(ctx context.Context, mux *runtime.ServeMux, client PluginAPIClient) error

RegisterPluginAPIHandlerClient registers the http handlers for service PluginAPI to "mux". The handlers forward requests to the grpc endpoint over the given implementation of "PluginAPIClient". Note: the gRPC framework executes interceptors within the gRPC handler. If the passed in "PluginAPIClient" doesn't go through the normal gRPC flow (creating a gRPC client etc.) then it will be up to the passed in "PluginAPIClient" to call the correct interceptors.

func RegisterPluginAPIHandlerFromEndpoint

func RegisterPluginAPIHandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, opts []grpc.DialOption) (err error)

RegisterPluginAPIHandlerFromEndpoint is same as RegisterPluginAPIHandler but automatically dials to "endpoint" and closes the connection when "ctx" gets done.

func RegisterPluginAPIHandlerServer

func RegisterPluginAPIHandlerServer(ctx context.Context, mux *runtime.ServeMux, server PluginAPIServer) error

RegisterPluginAPIHandlerServer registers the http handlers for service PluginAPI to "mux". UnaryRPC :call PluginAPIServer directly. StreamingRPC :currently unsupported pending https://github.com/grpc/grpc-go/issues/906. Note that using this registration option will cause many gRPC library features to stop working. Consider using RegisterPluginAPIHandlerFromEndpoint instead.

func RegisterPluginAPIServer

func RegisterPluginAPIServer(s grpc.ServiceRegistrar, srv PluginAPIServer)

func RegisterUnlockerHandler

func RegisterUnlockerHandler(ctx context.Context, mux *runtime.ServeMux, conn *grpc.ClientConn) error

RegisterUnlockerHandler registers the http handlers for service Unlocker to "mux". The handlers forward requests to the grpc endpoint over "conn".

func RegisterUnlockerHandlerClient

func RegisterUnlockerHandlerClient(ctx context.Context, mux *runtime.ServeMux, client UnlockerClient) error

RegisterUnlockerHandlerClient registers the http handlers for service Unlocker to "mux". The handlers forward requests to the grpc endpoint over the given implementation of "UnlockerClient". Note: the gRPC framework executes interceptors within the gRPC handler. If the passed in "UnlockerClient" doesn't go through the normal gRPC flow (creating a gRPC client etc.) then it will be up to the passed in "UnlockerClient" to call the correct interceptors.

func RegisterUnlockerHandlerFromEndpoint

func RegisterUnlockerHandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, opts []grpc.DialOption) (err error)

RegisterUnlockerHandlerFromEndpoint is same as RegisterUnlockerHandler but automatically dials to "endpoint" and closes the connection when "ctx" gets done.

func RegisterUnlockerHandlerServer

func RegisterUnlockerHandlerServer(ctx context.Context, mux *runtime.ServeMux, server UnlockerServer) error

RegisterUnlockerHandlerServer registers the http handlers for service Unlocker to "mux". UnaryRPC :call UnlockerServer directly. StreamingRPC :currently unsupported pending https://github.com/grpc/grpc-go/issues/906. Note that using this registration option will cause many gRPC library features to stop working. Consider using RegisterUnlockerHandlerFromEndpoint instead.

func RegisterUnlockerServer

func RegisterUnlockerServer(s grpc.ServiceRegistrar, srv UnlockerServer)

Types

type AdminTestRequest

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

func (*AdminTestRequest) Descriptor deprecated

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

Deprecated: Use AdminTestRequest.ProtoReflect.Descriptor instead.

func (*AdminTestRequest) ProtoMessage

func (*AdminTestRequest) ProtoMessage()

func (*AdminTestRequest) ProtoReflect

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

func (*AdminTestRequest) Reset

func (x *AdminTestRequest) Reset()

func (*AdminTestRequest) String

func (x *AdminTestRequest) String() string

type AdminTestResponse

type AdminTestResponse struct {

	// A short message indicating success or failure
	Msg string `protobuf:"bytes,1,opt,name=msg,proto3" json:"msg,omitempty"`
	// contains filtered or unexported fields
}

func (*AdminTestResponse) Descriptor deprecated

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

Deprecated: Use AdminTestResponse.ProtoReflect.Descriptor instead.

func (*AdminTestResponse) GetMsg

func (x *AdminTestResponse) GetMsg() string

func (*AdminTestResponse) ProtoMessage

func (*AdminTestResponse) ProtoMessage()

func (*AdminTestResponse) ProtoReflect

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

func (*AdminTestResponse) Reset

func (x *AdminTestResponse) Reset()

func (*AdminTestResponse) String

func (x *AdminTestResponse) String() string

type BakeMacaroonRequest

type BakeMacaroonRequest struct {

	// The length of time for which this macaroon is valid
	Timeout int64 `protobuf:"varint,1,opt,name=timeout,proto3" json:"timeout,omitempty"`
	// The unit for the macaroon timeout. Choose from `SECOND`, `MINUTE`, `HOUR` or `DAY`
	TimeoutType TimeoutType `protobuf:"varint,2,opt,name=timeout_type,json=timeoutType,proto3,enum=lanirpc.TimeoutType" json:"timeout_type,omitempty"`
	// The list of permissions the new macaroon should grant
	Permissions []*MacaroonPermission `protobuf:"bytes,3,rep,name=permissions,proto3" json:"permissions,omitempty"`
	// The list of plugin names to be included in the macaroon
	Plugins []string `protobuf:"bytes,4,rep,name=plugins,proto3" json:"plugins,omitempty"`
	// contains filtered or unexported fields
}

func (*BakeMacaroonRequest) Descriptor deprecated

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

Deprecated: Use BakeMacaroonRequest.ProtoReflect.Descriptor instead.

func (*BakeMacaroonRequest) GetPermissions

func (x *BakeMacaroonRequest) GetPermissions() []*MacaroonPermission

func (*BakeMacaroonRequest) GetPlugins

func (x *BakeMacaroonRequest) GetPlugins() []string

func (*BakeMacaroonRequest) GetTimeout

func (x *BakeMacaroonRequest) GetTimeout() int64

func (*BakeMacaroonRequest) GetTimeoutType

func (x *BakeMacaroonRequest) GetTimeoutType() TimeoutType

func (*BakeMacaroonRequest) ProtoMessage

func (*BakeMacaroonRequest) ProtoMessage()

func (*BakeMacaroonRequest) ProtoReflect

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

func (*BakeMacaroonRequest) Reset

func (x *BakeMacaroonRequest) Reset()

func (*BakeMacaroonRequest) String

func (x *BakeMacaroonRequest) String() string

type BakeMacaroonResponse

type BakeMacaroonResponse struct {

	// The hex-encoded macaroon, serialized in binary format
	Macaroon string `protobuf:"bytes,1,opt,name=macaroon,proto3" json:"macaroon,omitempty"`
	// contains filtered or unexported fields
}

func (*BakeMacaroonResponse) Descriptor deprecated

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

Deprecated: Use BakeMacaroonResponse.ProtoReflect.Descriptor instead.

func (*BakeMacaroonResponse) GetMacaroon

func (x *BakeMacaroonResponse) GetMacaroon() string

func (*BakeMacaroonResponse) ProtoMessage

func (*BakeMacaroonResponse) ProtoMessage()

func (*BakeMacaroonResponse) ProtoReflect

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

func (*BakeMacaroonResponse) Reset

func (x *BakeMacaroonResponse) Reset()

func (*BakeMacaroonResponse) String

func (x *BakeMacaroonResponse) String() string

type ChangePwdRequest

type ChangePwdRequest struct {

	//
	//current_password should be the current valid password used to unlock the
	//daemon. When using REST, this field must be encoded as base64.
	CurrentPassword []byte `protobuf:"bytes,1,opt,name=current_password,json=currentPassword,proto3" json:"current_password,omitempty"`
	//
	//new_password should be the desired, new password used to unlock the
	//daemon. When using REST, this field must be encoded as base64.
	NewPassword []byte `protobuf:"bytes,2,opt,name=new_password,json=newPassword,proto3" json:"new_password,omitempty"`
	//
	//new_macaroon_root_key is an optional argument instructing the daemon to
	//rotate the macaroon root key when set to true. This will invalidate all
	//previously generated macaroons.
	NewMacaroonRootKey bool `protobuf:"varint,3,opt,name=new_macaroon_root_key,json=newMacaroonRootKey,proto3" json:"new_macaroon_root_key,omitempty"`
	// contains filtered or unexported fields
}

func (*ChangePwdRequest) Descriptor deprecated

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

Deprecated: Use ChangePwdRequest.ProtoReflect.Descriptor instead.

func (*ChangePwdRequest) GetCurrentPassword

func (x *ChangePwdRequest) GetCurrentPassword() []byte

func (*ChangePwdRequest) GetNewMacaroonRootKey

func (x *ChangePwdRequest) GetNewMacaroonRootKey() bool

func (*ChangePwdRequest) GetNewPassword

func (x *ChangePwdRequest) GetNewPassword() []byte

func (*ChangePwdRequest) ProtoMessage

func (*ChangePwdRequest) ProtoMessage()

func (*ChangePwdRequest) ProtoReflect

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

func (*ChangePwdRequest) Reset

func (x *ChangePwdRequest) Reset()

func (*ChangePwdRequest) String

func (x *ChangePwdRequest) String() string

type ChangePwdResponse

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

func (*ChangePwdResponse) Descriptor deprecated

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

Deprecated: Use ChangePwdResponse.ProtoReflect.Descriptor instead.

func (*ChangePwdResponse) ProtoMessage

func (*ChangePwdResponse) ProtoMessage()

func (*ChangePwdResponse) ProtoReflect

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

func (*ChangePwdResponse) Reset

func (x *ChangePwdResponse) Reset()

func (*ChangePwdResponse) String

func (x *ChangePwdResponse) String() string

type ControllerPluginRequest

type ControllerPluginRequest struct {

	// the name of the plugin we wish to send the command to
	Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
	// the data we are sending to the plugin
	Frame *proto.Frame `protobuf:"bytes,2,opt,name=frame,proto3" json:"frame,omitempty"`
	// contains filtered or unexported fields
}

func (*ControllerPluginRequest) Descriptor deprecated

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

Deprecated: Use ControllerPluginRequest.ProtoReflect.Descriptor instead.

func (*ControllerPluginRequest) GetFrame

func (x *ControllerPluginRequest) GetFrame() *proto.Frame

func (*ControllerPluginRequest) GetName

func (x *ControllerPluginRequest) GetName() string

func (*ControllerPluginRequest) ProtoMessage

func (*ControllerPluginRequest) ProtoMessage()

func (*ControllerPluginRequest) ProtoReflect

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

func (*ControllerPluginRequest) Reset

func (x *ControllerPluginRequest) Reset()

func (*ControllerPluginRequest) String

func (x *ControllerPluginRequest) String() string

type HealthClient

type HealthClient interface {
	//
	//Check will check the health of various API services and plugins
	Check(ctx context.Context, in *HealthRequest, opts ...grpc.CallOption) (*HealthResponse, error)
}

HealthClient is the client API for Health 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 NewHealthClient

func NewHealthClient(cc grpc.ClientConnInterface) HealthClient

type HealthRequest

type HealthRequest struct {

	// the name of the service or plugin for which we want health information. Leave blank or put all to get all health information
	Service string `protobuf:"bytes,1,opt,name=service,proto3" json:"service,omitempty"`
	// contains filtered or unexported fields
}

func (*HealthRequest) Descriptor deprecated

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

Deprecated: Use HealthRequest.ProtoReflect.Descriptor instead.

func (*HealthRequest) GetService

func (x *HealthRequest) GetService() string

func (*HealthRequest) ProtoMessage

func (*HealthRequest) ProtoMessage()

func (*HealthRequest) ProtoReflect

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

func (*HealthRequest) Reset

func (x *HealthRequest) Reset()

func (*HealthRequest) String

func (x *HealthRequest) String() string

type HealthResponse

type HealthResponse struct {

	// the current states of all given services/plugins
	Status []*HealthUpdate `protobuf:"bytes,1,rep,name=status,proto3" json:"status,omitempty"`
	// contains filtered or unexported fields
}

func (*HealthResponse) Descriptor deprecated

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

Deprecated: Use HealthResponse.ProtoReflect.Descriptor instead.

func (*HealthResponse) GetStatus

func (x *HealthResponse) GetStatus() []*HealthUpdate

func (*HealthResponse) ProtoMessage

func (*HealthResponse) ProtoMessage()

func (*HealthResponse) ProtoReflect

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

func (*HealthResponse) Reset

func (x *HealthResponse) Reset()

func (*HealthResponse) String

func (x *HealthResponse) String() string

type HealthServer

type HealthServer interface {
	//
	//Check will check the health of various API services and plugins
	Check(context.Context, *HealthRequest) (*HealthResponse, error)
	// contains filtered or unexported methods
}

HealthServer is the server API for Health service. All implementations must embed UnimplementedHealthServer for forward compatibility

type HealthUpdate

type HealthUpdate struct {

	// the name of the service
	Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
	// the current state of the service
	State HealthUpdate_HealthState `protobuf:"varint,2,opt,name=state,proto3,enum=lanirpc.HealthUpdate_HealthState" json:"state,omitempty"`
	// contains filtered or unexported fields
}

func (*HealthUpdate) Descriptor deprecated

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

Deprecated: Use HealthUpdate.ProtoReflect.Descriptor instead.

func (*HealthUpdate) GetName

func (x *HealthUpdate) GetName() string

func (*HealthUpdate) GetState

func (x *HealthUpdate) GetState() HealthUpdate_HealthState

func (*HealthUpdate) ProtoMessage

func (*HealthUpdate) ProtoMessage()

func (*HealthUpdate) ProtoReflect

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

func (*HealthUpdate) Reset

func (x *HealthUpdate) Reset()

func (*HealthUpdate) String

func (x *HealthUpdate) String() string

type HealthUpdate_HealthState

type HealthUpdate_HealthState int32
const (
	HealthUpdate_UNKNOWN         HealthUpdate_HealthState = 0
	HealthUpdate_SERVING         HealthUpdate_HealthState = 1
	HealthUpdate_NOT_SERVING     HealthUpdate_HealthState = 2
	HealthUpdate_SERVICE_UNKNOWN HealthUpdate_HealthState = 3
)

func (HealthUpdate_HealthState) Descriptor

func (HealthUpdate_HealthState) Enum

func (HealthUpdate_HealthState) EnumDescriptor deprecated

func (HealthUpdate_HealthState) EnumDescriptor() ([]byte, []int)

Deprecated: Use HealthUpdate_HealthState.Descriptor instead.

func (HealthUpdate_HealthState) Number

func (HealthUpdate_HealthState) String

func (x HealthUpdate_HealthState) String() string

func (HealthUpdate_HealthState) Type

type LaniClient

type LaniClient interface {
	// lanicli: `stop`
	//StopDaemon will send a shutdown request to the interrupt handler, triggering
	//a graceful shutdown of the daemon.
	StopDaemon(ctx context.Context, in *StopRequest, opts ...grpc.CallOption) (*StopResponse, error)
	// lanicli: `admin-test`
	//AdminTest will send a string response if the proper macaroon is provided.
	AdminTest(ctx context.Context, in *AdminTestRequest, opts ...grpc.CallOption) (*AdminTestResponse, error)
	// lanicli: `test`
	//TestCommand will send a string response regardless if a macaroon is provided or not.
	TestCommand(ctx context.Context, in *TestRequest, opts ...grpc.CallOption) (*TestResponse, error)
	// lanicli: `bake-macaroon`
	//BakeMacaroon will bake a new macaroon based on input permissions and constraints.
	BakeMacaroon(ctx context.Context, in *BakeMacaroonRequest, opts ...grpc.CallOption) (*BakeMacaroonResponse, error)
	//
	//Deprecated! SetTemperature will now be a demo controller plugin which uses PluginAPI Command
	SetTemperature(ctx context.Context, in *proto.Empty, opts ...grpc.CallOption) (*proto.Empty, error)
	//
	//Deprecated! SetPressure will now be a demo controller plugin which uses PluginAPI Command
	SetPressure(ctx context.Context, in *proto.Empty, opts ...grpc.CallOption) (*proto.Empty, error)
	//
	//Deprecated! StartRecording is now /lanirpc.PluginAPI/StartRecord
	StartRecording(ctx context.Context, in *proto.Empty, opts ...grpc.CallOption) (*proto.Empty, error)
	//
	//Deprecated! StopRecording is now /lanirpc.PluginAPI/StopRecord
	StopRecording(ctx context.Context, in *proto.Empty, opts ...grpc.CallOption) (*proto.Empty, error)
	//
	//Deprecated! SubscribeDataStream is now /lanirpc.PluginAPI/Subscribe
	SubscribeDataStream(ctx context.Context, in *proto.Empty, opts ...grpc.CallOption) (*proto.Empty, error)
	//
	//Deprecated! LoadTestPlan will no longer be supported
	LoadTestPlan(ctx context.Context, in *proto.Empty, opts ...grpc.CallOption) (*proto.Empty, error)
	//
	//Deprecated! StartTestPlan will no longer be supported
	StartTestPlan(ctx context.Context, in *proto.Empty, opts ...grpc.CallOption) (*proto.Empty, error)
	//
	//Deprecated! StopTestPlan will no longer be supported
	StopTestPlan(ctx context.Context, in *proto.Empty, opts ...grpc.CallOption) (*proto.Empty, error)
	//
	//Deprecated! InsertROIMarker will no longer be supported
	InsertROIMarker(ctx context.Context, in *proto.Empty, opts ...grpc.CallOption) (*proto.Empty, error)
}

LaniClient is the client API for Lani 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 NewLaniClient

func NewLaniClient(cc grpc.ClientConnInterface) LaniClient

type LaniServer

type LaniServer interface {
	// lanicli: `stop`
	//StopDaemon will send a shutdown request to the interrupt handler, triggering
	//a graceful shutdown of the daemon.
	StopDaemon(context.Context, *StopRequest) (*StopResponse, error)
	// lanicli: `admin-test`
	//AdminTest will send a string response if the proper macaroon is provided.
	AdminTest(context.Context, *AdminTestRequest) (*AdminTestResponse, error)
	// lanicli: `test`
	//TestCommand will send a string response regardless if a macaroon is provided or not.
	TestCommand(context.Context, *TestRequest) (*TestResponse, error)
	// lanicli: `bake-macaroon`
	//BakeMacaroon will bake a new macaroon based on input permissions and constraints.
	BakeMacaroon(context.Context, *BakeMacaroonRequest) (*BakeMacaroonResponse, error)
	//
	//Deprecated! SetTemperature will now be a demo controller plugin which uses PluginAPI Command
	SetTemperature(context.Context, *proto.Empty) (*proto.Empty, error)
	//
	//Deprecated! SetPressure will now be a demo controller plugin which uses PluginAPI Command
	SetPressure(context.Context, *proto.Empty) (*proto.Empty, error)
	//
	//Deprecated! StartRecording is now /lanirpc.PluginAPI/StartRecord
	StartRecording(context.Context, *proto.Empty) (*proto.Empty, error)
	//
	//Deprecated! StopRecording is now /lanirpc.PluginAPI/StopRecord
	StopRecording(context.Context, *proto.Empty) (*proto.Empty, error)
	//
	//Deprecated! SubscribeDataStream is now /lanirpc.PluginAPI/Subscribe
	SubscribeDataStream(context.Context, *proto.Empty) (*proto.Empty, error)
	//
	//Deprecated! LoadTestPlan will no longer be supported
	LoadTestPlan(context.Context, *proto.Empty) (*proto.Empty, error)
	//
	//Deprecated! StartTestPlan will no longer be supported
	StartTestPlan(context.Context, *proto.Empty) (*proto.Empty, error)
	//
	//Deprecated! StopTestPlan will no longer be supported
	StopTestPlan(context.Context, *proto.Empty) (*proto.Empty, error)
	//
	//Deprecated! InsertROIMarker will no longer be supported
	InsertROIMarker(context.Context, *proto.Empty) (*proto.Empty, error)
	// contains filtered or unexported methods
}

LaniServer is the server API for Lani service. All implementations must embed UnimplementedLaniServer for forward compatibility

type LoginRequest

type LoginRequest struct {

	//
	//The password should be the current valid password for the daemon. This
	//will be required to decrypt on-disk material that the daemon requires to
	//function properly. When using REST, this field must be encoded as base64.
	Password []byte `protobuf:"bytes,1,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) GetPassword

func (x *LoginRequest) GetPassword() []byte

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 {
	// contains filtered or unexported fields
}

func (*LoginResponse) Descriptor deprecated

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

Deprecated: Use LoginResponse.ProtoReflect.Descriptor instead.

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 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 Plugin

type Plugin struct {

	// The name of the plugin
	Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
	// The plugin type (either Datasource or Controller)
	Type Plugin_PluginType `protobuf:"varint,2,opt,name=type,proto3,enum=lanirpc.Plugin_PluginType" json:"type,omitempty"`
	// the current state of the plugin
	State PluginState `protobuf:"varint,3,opt,name=state,proto3,enum=lanirpc.PluginState" json:"state,omitempty"`
	// Unix milli timestamp of when the plugin was started
	StartedAt int64 `protobuf:"varint,4,opt,name=started_at,json=startedAt,proto3" json:"started_at,omitempty"`
	// Unix milli timestamp of when the plugin was stopped or killed. Value is 0 if it's not stopped or killed
	StoppedAt int64 `protobuf:"varint,5,opt,name=stopped_at,json=stoppedAt,proto3" json:"stopped_at,omitempty"`
	// The version number of the plugin, specified in the plugin
	Version string `protobuf:"bytes,6,opt,name=version,proto3" json:"version,omitempty"`
	// contains filtered or unexported fields
}

func (*Plugin) Descriptor deprecated

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

Deprecated: Use Plugin.ProtoReflect.Descriptor instead.

func (*Plugin) GetName

func (x *Plugin) GetName() string

func (*Plugin) GetStartedAt

func (x *Plugin) GetStartedAt() int64

func (*Plugin) GetState

func (x *Plugin) GetState() PluginState

func (*Plugin) GetStoppedAt

func (x *Plugin) GetStoppedAt() int64

func (*Plugin) GetType

func (x *Plugin) GetType() Plugin_PluginType

func (*Plugin) GetVersion

func (x *Plugin) GetVersion() string

func (*Plugin) ProtoMessage

func (*Plugin) ProtoMessage()

func (*Plugin) ProtoReflect

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

func (*Plugin) Reset

func (x *Plugin) Reset()

func (*Plugin) String

func (x *Plugin) String() string

type PluginAPIClient

type PluginAPIClient interface {
	// lanicli: `plugin-startrecord`
	//StartRecording will begin recording data from specified datasource.
	StartRecord(ctx context.Context, in *PluginRequest, opts ...grpc.CallOption) (*proto.Empty, error)
	// lanicli: `plugin-stoprecord`
	//StopRecording will end the recording of data from specified datasource.
	StopRecord(ctx context.Context, in *PluginRequest, opts ...grpc.CallOption) (*proto.Empty, error)
	//
	//Subscribe returns a uni-directional stream of data from a specified datasource.
	Subscribe(ctx context.Context, in *PluginRequest, opts ...grpc.CallOption) (PluginAPI_SubscribeClient, error)
	// lanicli: `plugin-start`
	//StartPlugin will start the specified existing plugin. Plugins added in this way will not be present upon laniakea restart
	StartPlugin(ctx context.Context, in *PluginRequest, opts ...grpc.CallOption) (*proto.Empty, error)
	// lanicli: `plugin-stop`
	//StopPlugin will stop the specified plugin.
	StopPlugin(ctx context.Context, in *PluginRequest, opts ...grpc.CallOption) (*proto.Empty, error)
	// lanicli: `plugin-command`
	//Command will send any command to a controller service.
	Command(ctx context.Context, in *ControllerPluginRequest, opts ...grpc.CallOption) (PluginAPI_CommandClient, error)
	// lanicli: `plugin-list`
	//ListPlugins will send a list of registered and running plugins.
	ListPlugins(ctx context.Context, in *proto.Empty, opts ...grpc.CallOption) (*PluginsList, error)
	// lanicli: `plugin-add`
	//AddPlugin will add a plugin from given information.
	AddPlugin(ctx context.Context, in *PluginConfig, opts ...grpc.CallOption) (*Plugin, error)
	// lanicli: `plugin-info`
	//GetPlugin will retrieve the information for the given plugin.
	GetPlugin(ctx context.Context, in *PluginRequest, opts ...grpc.CallOption) (*Plugin, error)
	//
	//SubscribePluginState will create a stream which pushes plugin state updates to client
	SubscribePluginState(ctx context.Context, in *PluginRequest, opts ...grpc.CallOption) (PluginAPI_SubscribePluginStateClient, error)
}

PluginAPIClient is the client API for PluginAPI 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 NewPluginAPIClient

func NewPluginAPIClient(cc grpc.ClientConnInterface) PluginAPIClient

type PluginAPIServer

type PluginAPIServer interface {
	// lanicli: `plugin-startrecord`
	//StartRecording will begin recording data from specified datasource.
	StartRecord(context.Context, *PluginRequest) (*proto.Empty, error)
	// lanicli: `plugin-stoprecord`
	//StopRecording will end the recording of data from specified datasource.
	StopRecord(context.Context, *PluginRequest) (*proto.Empty, error)
	//
	//Subscribe returns a uni-directional stream of data from a specified datasource.
	Subscribe(*PluginRequest, PluginAPI_SubscribeServer) error
	// lanicli: `plugin-start`
	//StartPlugin will start the specified existing plugin. Plugins added in this way will not be present upon laniakea restart
	StartPlugin(context.Context, *PluginRequest) (*proto.Empty, error)
	// lanicli: `plugin-stop`
	//StopPlugin will stop the specified plugin.
	StopPlugin(context.Context, *PluginRequest) (*proto.Empty, error)
	// lanicli: `plugin-command`
	//Command will send any command to a controller service.
	Command(*ControllerPluginRequest, PluginAPI_CommandServer) error
	// lanicli: `plugin-list`
	//ListPlugins will send a list of registered and running plugins.
	ListPlugins(context.Context, *proto.Empty) (*PluginsList, error)
	// lanicli: `plugin-add`
	//AddPlugin will add a plugin from given information.
	AddPlugin(context.Context, *PluginConfig) (*Plugin, error)
	// lanicli: `plugin-info`
	//GetPlugin will retrieve the information for the given plugin.
	GetPlugin(context.Context, *PluginRequest) (*Plugin, error)
	//
	//SubscribePluginState will create a stream which pushes plugin state updates to client
	SubscribePluginState(*PluginRequest, PluginAPI_SubscribePluginStateServer) error
	// contains filtered or unexported methods
}

PluginAPIServer is the server API for PluginAPI service. All implementations must embed UnimplementedPluginAPIServer for forward compatibility

type PluginAPI_CommandClient

type PluginAPI_CommandClient interface {
	Recv() (*proto.Frame, error)
	grpc.ClientStream
}

type PluginAPI_CommandServer

type PluginAPI_CommandServer interface {
	Send(*proto.Frame) error
	grpc.ServerStream
}

type PluginAPI_SubscribeClient

type PluginAPI_SubscribeClient interface {
	Recv() (*proto.Frame, error)
	grpc.ClientStream
}

type PluginAPI_SubscribePluginStateClient

type PluginAPI_SubscribePluginStateClient interface {
	Recv() (*PluginStateUpdate, error)
	grpc.ClientStream
}

type PluginAPI_SubscribePluginStateServer

type PluginAPI_SubscribePluginStateServer interface {
	Send(*PluginStateUpdate) error
	grpc.ServerStream
}

type PluginAPI_SubscribeServer

type PluginAPI_SubscribeServer interface {
	Send(*proto.Frame) error
	grpc.ServerStream
}

type PluginConfig

type PluginConfig struct {

	// the name of the plugin
	Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty" yaml:"name"`
	// the type of the plugin, either datasource or controller
	Type string `protobuf:"bytes,2,opt,name=type,proto3" json:"type,omitempty" yaml:"type"`
	// the name of the executable of the plugin
	ExecName string `protobuf:"bytes,3,opt,name=exec_name,json=execName,proto3" json:"exec_name,omitempty" yaml:"exec"`
	// the time in seconds to determine if a plugin has timed out
	Timeout int64 `protobuf:"varint,4,opt,name=timeout,proto3" json:"timeout,omitempty" yaml:"timeout"`
	// the maximum number of times a plugin can timeout
	MaxTimeouts int64 `protobuf:"varint,5,opt,name=max_timeouts,json=maxTimeouts,proto3" json:"max_timeouts,omitempty" yaml:"maxTimeouts"`
	// contains filtered or unexported fields
}

func (*PluginConfig) Descriptor deprecated

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

Deprecated: Use PluginConfig.ProtoReflect.Descriptor instead.

func (*PluginConfig) GetExecName

func (x *PluginConfig) GetExecName() string

func (*PluginConfig) GetMaxTimeouts

func (x *PluginConfig) GetMaxTimeouts() int64

func (*PluginConfig) GetName

func (x *PluginConfig) GetName() string

func (*PluginConfig) GetTimeout

func (x *PluginConfig) GetTimeout() int64

func (*PluginConfig) GetType

func (x *PluginConfig) GetType() string

func (*PluginConfig) ProtoMessage

func (*PluginConfig) ProtoMessage()

func (*PluginConfig) ProtoReflect

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

func (*PluginConfig) Reset

func (x *PluginConfig) Reset()

func (*PluginConfig) String

func (x *PluginConfig) String() string

type PluginRequest

type PluginRequest struct {

	// The name of the plugin we want to interact with
	Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
	// contains filtered or unexported fields
}

func (*PluginRequest) Descriptor deprecated

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

Deprecated: Use PluginRequest.ProtoReflect.Descriptor instead.

func (*PluginRequest) GetName

func (x *PluginRequest) GetName() string

func (*PluginRequest) ProtoMessage

func (*PluginRequest) ProtoMessage()

func (*PluginRequest) ProtoReflect

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

func (*PluginRequest) Reset

func (x *PluginRequest) Reset()

func (*PluginRequest) String

func (x *PluginRequest) String() string

type PluginState

type PluginState int32
const (
	PluginState_READY        PluginState = 0
	PluginState_BUSY         PluginState = 1
	PluginState_STOPPING     PluginState = 2
	PluginState_STOPPED      PluginState = 3
	PluginState_UNKNOWN      PluginState = 4
	PluginState_UNRESPONSIVE PluginState = 5
	PluginState_KILLED       PluginState = 6
)

func (PluginState) Descriptor

func (PluginState) Enum

func (x PluginState) Enum() *PluginState

func (PluginState) EnumDescriptor deprecated

func (PluginState) EnumDescriptor() ([]byte, []int)

Deprecated: Use PluginState.Descriptor instead.

func (PluginState) Number

func (x PluginState) Number() protoreflect.EnumNumber

func (PluginState) String

func (x PluginState) String() string

func (PluginState) Type

type PluginStateUpdate

type PluginStateUpdate struct {

	// the name of the plugin
	Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
	// the current state of the plugin
	State PluginState `protobuf:"varint,2,opt,name=state,proto3,enum=lanirpc.PluginState" json:"state,omitempty"`
	// contains filtered or unexported fields
}

func (*PluginStateUpdate) Descriptor deprecated

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

Deprecated: Use PluginStateUpdate.ProtoReflect.Descriptor instead.

func (*PluginStateUpdate) GetName

func (x *PluginStateUpdate) GetName() string

func (*PluginStateUpdate) GetState

func (x *PluginStateUpdate) GetState() PluginState

func (*PluginStateUpdate) ProtoMessage

func (*PluginStateUpdate) ProtoMessage()

func (*PluginStateUpdate) ProtoReflect

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

func (*PluginStateUpdate) Reset

func (x *PluginStateUpdate) Reset()

func (*PluginStateUpdate) String

func (x *PluginStateUpdate) String() string

type Plugin_PluginType

type Plugin_PluginType int32
const (
	Plugin_DATASOURCE Plugin_PluginType = 0
	Plugin_CONTROLLER Plugin_PluginType = 1
)

func (Plugin_PluginType) Descriptor

func (Plugin_PluginType) Enum

func (Plugin_PluginType) EnumDescriptor deprecated

func (Plugin_PluginType) EnumDescriptor() ([]byte, []int)

Deprecated: Use Plugin_PluginType.Descriptor instead.

func (Plugin_PluginType) Number

func (Plugin_PluginType) String

func (x Plugin_PluginType) String() string

func (Plugin_PluginType) Type

type PluginsList

type PluginsList struct {

	// List of all currently registered plugins
	Plugins []*Plugin `protobuf:"bytes,1,rep,name=plugins,proto3" json:"plugins,omitempty"`
	// contains filtered or unexported fields
}

func (*PluginsList) Descriptor deprecated

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

Deprecated: Use PluginsList.ProtoReflect.Descriptor instead.

func (*PluginsList) GetPlugins

func (x *PluginsList) GetPlugins() []*Plugin

func (*PluginsList) ProtoMessage

func (*PluginsList) ProtoMessage()

func (*PluginsList) ProtoReflect

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

func (*PluginsList) Reset

func (x *PluginsList) Reset()

func (*PluginsList) String

func (x *PluginsList) String() string

type SetPwdRequest

type SetPwdRequest struct {

	//
	//The password is the password that should be used to encrypt on-disk material
	//that the daemon requires to function properly. After creation, this
	//password is required to unlock the daemon. When using REST, this field
	//must be encoded as base64.
	Password []byte `protobuf:"bytes,1,opt,name=password,proto3" json:"password,omitempty"`
	// contains filtered or unexported fields
}

func (*SetPwdRequest) Descriptor deprecated

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

Deprecated: Use SetPwdRequest.ProtoReflect.Descriptor instead.

func (*SetPwdRequest) GetPassword

func (x *SetPwdRequest) GetPassword() []byte

func (*SetPwdRequest) ProtoMessage

func (*SetPwdRequest) ProtoMessage()

func (*SetPwdRequest) ProtoReflect

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

func (*SetPwdRequest) Reset

func (x *SetPwdRequest) Reset()

func (*SetPwdRequest) String

func (x *SetPwdRequest) String() string

type SetPwdResponse

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

func (*SetPwdResponse) Descriptor deprecated

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

Deprecated: Use SetPwdResponse.ProtoReflect.Descriptor instead.

func (*SetPwdResponse) ProtoMessage

func (*SetPwdResponse) ProtoMessage()

func (*SetPwdResponse) ProtoReflect

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

func (*SetPwdResponse) Reset

func (x *SetPwdResponse) Reset()

func (*SetPwdResponse) String

func (x *SetPwdResponse) String() string

type StopRequest

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

func (*StopRequest) Descriptor deprecated

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

Deprecated: Use StopRequest.ProtoReflect.Descriptor instead.

func (*StopRequest) ProtoMessage

func (*StopRequest) ProtoMessage()

func (*StopRequest) ProtoReflect

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

func (*StopRequest) Reset

func (x *StopRequest) Reset()

func (*StopRequest) String

func (x *StopRequest) String() string

type StopResponse

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

func (*StopResponse) Descriptor deprecated

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

Deprecated: Use StopResponse.ProtoReflect.Descriptor instead.

func (*StopResponse) ProtoMessage

func (*StopResponse) ProtoMessage()

func (*StopResponse) ProtoReflect

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

func (*StopResponse) Reset

func (x *StopResponse) Reset()

func (*StopResponse) String

func (x *StopResponse) String() string

type TestRequest

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

func (*TestRequest) Descriptor deprecated

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

Deprecated: Use TestRequest.ProtoReflect.Descriptor instead.

func (*TestRequest) ProtoMessage

func (*TestRequest) ProtoMessage()

func (*TestRequest) ProtoReflect

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

func (*TestRequest) Reset

func (x *TestRequest) Reset()

func (*TestRequest) String

func (x *TestRequest) String() string

type TestResponse

type TestResponse struct {

	// A short message indicating success or failure
	Msg string `protobuf:"bytes,1,opt,name=msg,proto3" json:"msg,omitempty"`
	// contains filtered or unexported fields
}

func (*TestResponse) Descriptor deprecated

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

Deprecated: Use TestResponse.ProtoReflect.Descriptor instead.

func (*TestResponse) GetMsg

func (x *TestResponse) GetMsg() string

func (*TestResponse) ProtoMessage

func (*TestResponse) ProtoMessage()

func (*TestResponse) ProtoReflect

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

func (*TestResponse) Reset

func (x *TestResponse) Reset()

func (*TestResponse) String

func (x *TestResponse) String() string

type TimeoutType

type TimeoutType int32
const (
	TimeoutType_SECOND TimeoutType = 0
	TimeoutType_MINUTE TimeoutType = 1
	TimeoutType_HOUR   TimeoutType = 2
	TimeoutType_DAY    TimeoutType = 3
)

func (TimeoutType) Descriptor

func (TimeoutType) Enum

func (x TimeoutType) Enum() *TimeoutType

func (TimeoutType) EnumDescriptor deprecated

func (TimeoutType) EnumDescriptor() ([]byte, []int)

Deprecated: Use TimeoutType.Descriptor instead.

func (TimeoutType) Number

func (x TimeoutType) Number() protoreflect.EnumNumber

func (TimeoutType) String

func (x TimeoutType) String() string

func (TimeoutType) Type

type UnimplementedHealthServer

type UnimplementedHealthServer struct {
}

UnimplementedHealthServer must be embedded to have forward compatible implementations.

func (UnimplementedHealthServer) Check

type UnimplementedLaniServer

type UnimplementedLaniServer struct {
}

UnimplementedLaniServer must be embedded to have forward compatible implementations.

func (UnimplementedLaniServer) AdminTest

func (UnimplementedLaniServer) BakeMacaroon

func (UnimplementedLaniServer) InsertROIMarker

func (UnimplementedLaniServer) LoadTestPlan

func (UnimplementedLaniServer) SetPressure

func (UnimplementedLaniServer) SetTemperature

func (UnimplementedLaniServer) StartRecording

func (UnimplementedLaniServer) StartTestPlan

func (UnimplementedLaniServer) StopDaemon

func (UnimplementedLaniServer) StopRecording

func (UnimplementedLaniServer) StopTestPlan

func (UnimplementedLaniServer) SubscribeDataStream

func (UnimplementedLaniServer) SubscribeDataStream(context.Context, *proto.Empty) (*proto.Empty, error)

func (UnimplementedLaniServer) TestCommand

type UnimplementedPluginAPIServer

type UnimplementedPluginAPIServer struct {
}

UnimplementedPluginAPIServer must be embedded to have forward compatible implementations.

func (UnimplementedPluginAPIServer) AddPlugin

func (UnimplementedPluginAPIServer) Command

func (UnimplementedPluginAPIServer) GetPlugin

func (UnimplementedPluginAPIServer) ListPlugins

func (UnimplementedPluginAPIServer) StartPlugin

func (UnimplementedPluginAPIServer) StartRecord

func (UnimplementedPluginAPIServer) StopPlugin

func (UnimplementedPluginAPIServer) StopRecord

func (UnimplementedPluginAPIServer) Subscribe

func (UnimplementedPluginAPIServer) SubscribePluginState

type UnimplementedUnlockerServer

type UnimplementedUnlockerServer struct {
}

UnimplementedUnlockerServer must be embedded to have forward compatible implementations.

func (UnimplementedUnlockerServer) ChangePassword

func (UnimplementedUnlockerServer) Login

func (UnimplementedUnlockerServer) SetPassword

type UnlockerClient

type UnlockerClient interface {
	// lanicli: `login`
	//Login will prompt the user to provide a password and send the response to the unlocker service for authentication.
	Login(ctx context.Context, in *LoginRequest, opts ...grpc.CallOption) (*LoginResponse, error)
	// lanicli: `setpassword`
	//SetPassword prompts the user to set a password on first startup if no password has already been set.
	SetPassword(ctx context.Context, in *SetPwdRequest, opts ...grpc.CallOption) (*SetPwdResponse, error)
	// lanicli: `changepassword`
	//ChangePassword prompts the user to enter the current password and enter a new password.
	ChangePassword(ctx context.Context, in *ChangePwdRequest, opts ...grpc.CallOption) (*ChangePwdResponse, error)
}

UnlockerClient is the client API for Unlocker 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 NewUnlockerClient

func NewUnlockerClient(cc grpc.ClientConnInterface) UnlockerClient

type UnlockerServer

type UnlockerServer interface {
	// lanicli: `login`
	//Login will prompt the user to provide a password and send the response to the unlocker service for authentication.
	Login(context.Context, *LoginRequest) (*LoginResponse, error)
	// lanicli: `setpassword`
	//SetPassword prompts the user to set a password on first startup if no password has already been set.
	SetPassword(context.Context, *SetPwdRequest) (*SetPwdResponse, error)
	// lanicli: `changepassword`
	//ChangePassword prompts the user to enter the current password and enter a new password.
	ChangePassword(context.Context, *ChangePwdRequest) (*ChangePwdResponse, error)
	// contains filtered or unexported methods
}

UnlockerServer is the server API for Unlocker service. All implementations must embed UnimplementedUnlockerServer for forward compatibility

type UnsafeHealthServer

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

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

type UnsafeLaniServer

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

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

type UnsafePluginAPIServer

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

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

type UnsafeUnlockerServer

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

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

type WebsocketProxy

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

func (*WebsocketProxy) ServeHTTP

func (p *WebsocketProxy) ServeHTTP(w http.ResponseWriter, r *http.Request)

ServeHTTP handles the incoming HTTP request. If the request is an "upgradeable" WebSocket request (identified by header fields), then the WS proxy handles the request. Otherwise the request is passed directly to the underlying REST proxy.

Jump to

Keyboard shortcuts

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