api

package
v0.14.3 Latest Latest
Warning

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

Go to latest
Published: May 21, 2024 License: Apache-2.0 Imports: 12 Imported by: 3

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	Identifier_Type_name = map[int32]string{
		0: "HOST",
		1: "CLIENT",
	}
	Identifier_Type_value = map[string]int32{
		"HOST":   0,
		"CLIENT": 1,
	}
)

Enum value maps for Identifier_Type.

View Source
var AdminService_ServiceDesc = grpc.ServiceDesc{
	ServiceName: "api.AdminService",
	HandlerType: (*AdminServiceServer)(nil),
	Methods: []grpc.MethodDesc{
		{
			MethodName: "GetSession",
			Handler:    _AdminService_GetSession_Handler,
		},
	},
	Streams:  []grpc.StreamDesc{},
	Metadata: "api.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)

Functions

func EncodeIdentifier

func EncodeIdentifier(id *Identifier) (string, error)

func EncodeIdentifierSession

func EncodeIdentifierSession(session *GetSessionResponse) (string, error)

func RegisterAdminServiceServer

func RegisterAdminServiceServer(s grpc.ServiceRegistrar, srv AdminServiceServer)

Types

type AdminServiceClient

type AdminServiceClient interface {
	GetSession(ctx context.Context, in *GetSessionRequest, opts ...grpc.CallOption) (*GetSessionResponse, 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.

type AdminServiceServer

type AdminServiceServer interface {
	GetSession(context.Context, *GetSessionRequest) (*GetSessionResponse, error)
}

AdminServiceServer is the server API for AdminService service. All implementations should embed UnimplementedAdminServiceServer for forward compatibility

type AuthorizedKey added in v0.13.0

type AuthorizedKey struct {
	PublicKeyFingerprints []string `` /* 126-byte string literal not displayed */
	Comment               string   `protobuf:"bytes,2,opt,name=comment,proto3" json:"comment,omitempty"`
	// contains filtered or unexported fields
}

func (*AuthorizedKey) Descriptor deprecated added in v0.13.0

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

Deprecated: Use AuthorizedKey.ProtoReflect.Descriptor instead.

func (*AuthorizedKey) GetComment added in v0.13.0

func (x *AuthorizedKey) GetComment() string

func (*AuthorizedKey) GetPublicKeyFingerprints added in v0.13.0

func (x *AuthorizedKey) GetPublicKeyFingerprints() []string

func (*AuthorizedKey) ProtoMessage added in v0.13.0

func (*AuthorizedKey) ProtoMessage()

func (*AuthorizedKey) ProtoReflect added in v0.13.0

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

func (*AuthorizedKey) Reset added in v0.13.0

func (x *AuthorizedKey) Reset()

func (*AuthorizedKey) String added in v0.13.0

func (x *AuthorizedKey) String() string

type Client

type Client struct {
	Id                   string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"`
	Version              string `protobuf:"bytes,2,opt,name=version,proto3" json:"version,omitempty"`
	Addr                 string `protobuf:"bytes,3,opt,name=addr,proto3" json:"addr,omitempty"`
	PublicKeyFingerprint string `protobuf:"bytes,4,opt,name=public_key_fingerprint,json=publicKeyFingerprint,proto3" json:"public_key_fingerprint,omitempty"`
	// contains filtered or unexported fields
}

func (*Client) Descriptor deprecated

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

Deprecated: Use Client.ProtoReflect.Descriptor instead.

func (*Client) GetAddr

func (x *Client) GetAddr() string

func (*Client) GetId

func (x *Client) GetId() string

func (*Client) GetPublicKeyFingerprint

func (x *Client) GetPublicKeyFingerprint() string

func (*Client) GetVersion

func (x *Client) GetVersion() string

func (*Client) ProtoMessage

func (*Client) ProtoMessage()

func (*Client) ProtoReflect added in v0.5.0

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

func (*Client) Reset

func (x *Client) Reset()

func (*Client) String

func (x *Client) String() string

type GetSessionRequest

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

func (*GetSessionRequest) Descriptor deprecated

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

Deprecated: Use GetSessionRequest.ProtoReflect.Descriptor instead.

func (*GetSessionRequest) ProtoMessage

func (*GetSessionRequest) ProtoMessage()

func (*GetSessionRequest) ProtoReflect added in v0.5.0

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

func (*GetSessionRequest) Reset

func (x *GetSessionRequest) Reset()

func (*GetSessionRequest) String

func (x *GetSessionRequest) String() string

type GetSessionResponse

type GetSessionResponse struct {
	SessionId        string           `protobuf:"bytes,1,opt,name=session_id,json=sessionId,proto3" json:"session_id,omitempty"`
	Command          []string         `protobuf:"bytes,2,rep,name=command,proto3" json:"command,omitempty"`
	ForceCommand     []string         `protobuf:"bytes,3,rep,name=force_command,json=forceCommand,proto3" json:"force_command,omitempty"`
	Host             string           `protobuf:"bytes,4,opt,name=host,proto3" json:"host,omitempty"`
	NodeAddr         string           `protobuf:"bytes,5,opt,name=node_addr,json=nodeAddr,proto3" json:"node_addr,omitempty"`
	ConnectedClients []*Client        `protobuf:"bytes,6,rep,name=connected_clients,json=connectedClients,proto3" json:"connected_clients,omitempty"`
	AuthorizedKeys   []*AuthorizedKey `protobuf:"bytes,7,rep,name=authorized_keys,json=authorizedKeys,proto3" json:"authorized_keys,omitempty"`
	// contains filtered or unexported fields
}

func (*GetSessionResponse) Descriptor deprecated

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

Deprecated: Use GetSessionResponse.ProtoReflect.Descriptor instead.

func (*GetSessionResponse) GetAuthorizedKeys added in v0.13.0

func (x *GetSessionResponse) GetAuthorizedKeys() []*AuthorizedKey

func (*GetSessionResponse) GetCommand

func (x *GetSessionResponse) GetCommand() []string

func (*GetSessionResponse) GetConnectedClients

func (x *GetSessionResponse) GetConnectedClients() []*Client

func (*GetSessionResponse) GetForceCommand

func (x *GetSessionResponse) GetForceCommand() []string

func (*GetSessionResponse) GetHost

func (x *GetSessionResponse) GetHost() string

func (*GetSessionResponse) GetNodeAddr

func (x *GetSessionResponse) GetNodeAddr() string

func (*GetSessionResponse) GetSessionId

func (x *GetSessionResponse) GetSessionId() string

func (*GetSessionResponse) ProtoMessage

func (*GetSessionResponse) ProtoMessage()

func (*GetSessionResponse) ProtoReflect added in v0.5.0

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

func (*GetSessionResponse) Reset

func (x *GetSessionResponse) Reset()

func (*GetSessionResponse) String

func (x *GetSessionResponse) String() string

type Identifier

type Identifier struct {
	Id       string          `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"`
	Type     Identifier_Type `protobuf:"varint,2,opt,name=type,proto3,enum=api.Identifier_Type" json:"type,omitempty"`
	NodeAddr string          `protobuf:"bytes,3,opt,name=node_addr,json=nodeAddr,proto3" json:"node_addr,omitempty"`
	// contains filtered or unexported fields
}

func DecodeIdentifier

func DecodeIdentifier(id, clientVersion string) (*Identifier, error)

func (*Identifier) Descriptor deprecated

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

Deprecated: Use Identifier.ProtoReflect.Descriptor instead.

func (*Identifier) GetId

func (x *Identifier) GetId() string

func (*Identifier) GetNodeAddr

func (x *Identifier) GetNodeAddr() string

func (*Identifier) GetType

func (x *Identifier) GetType() Identifier_Type

func (*Identifier) ProtoMessage

func (*Identifier) ProtoMessage()

func (*Identifier) ProtoReflect added in v0.5.0

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

func (*Identifier) Reset

func (x *Identifier) Reset()

func (*Identifier) String

func (x *Identifier) String() string

type Identifier_Type

type Identifier_Type int32
const (
	Identifier_HOST   Identifier_Type = 0
	Identifier_CLIENT Identifier_Type = 1
)

func (Identifier_Type) Descriptor added in v0.5.0

func (Identifier_Type) Enum added in v0.5.0

func (x Identifier_Type) Enum() *Identifier_Type

func (Identifier_Type) EnumDescriptor deprecated

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

Deprecated: Use Identifier_Type.Descriptor instead.

func (Identifier_Type) Number added in v0.5.0

func (Identifier_Type) String

func (x Identifier_Type) String() string

func (Identifier_Type) Type added in v0.5.0

type UnimplementedAdminServiceServer

type UnimplementedAdminServiceServer struct {
}

UnimplementedAdminServiceServer should be embedded to have forward compatible implementations.

func (UnimplementedAdminServiceServer) GetSession

type UnsafeAdminServiceServer added in v0.10.0

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.

Jump to

Keyboard shortcuts

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