clients

package
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: Dec 6, 2021 License: GPL-3.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ClientService_ServiceDesc = grpc.ServiceDesc{
	ServiceName: "server.clients.ClientService",
	HandlerType: (*ClientServiceServer)(nil),
	Methods: []grpc.MethodDesc{
		{
			MethodName: "Create",
			Handler:    _ClientService_Create_Handler,
		},
		{
			MethodName: "Delete",
			Handler:    _ClientService_Delete_Handler,
		},
	},
	Streams:  []grpc.StreamDesc{},
	Metadata: "clients/client.proto",
}

ClientService_ServiceDesc is the grpc.ServiceDesc for ClientService 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 File_clients_client_proto protoreflect.FileDescriptor

Functions

func RegisterClientServiceServer

func RegisterClientServiceServer(s grpc.ServiceRegistrar, srv ClientServiceServer)

Types

type ClientServiceClient

type ClientServiceClient interface {
	Create(ctx context.Context, in *CreateClientRequest, opts ...grpc.CallOption) (*CreateClientResponse, error)
	Delete(ctx context.Context, in *DeleteClientRequest, opts ...grpc.CallOption) (*emptypb.Empty, error)
}

ClientServiceClient is the client API for ClientService 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 ClientServiceServer

type ClientServiceServer interface {
	Create(context.Context, *CreateClientRequest) (*CreateClientResponse, error)
	Delete(context.Context, *DeleteClientRequest) (*emptypb.Empty, error)
	// contains filtered or unexported methods
}

ClientServiceServer is the server API for ClientService service. All implementations must embed UnimplementedClientServiceServer for forward compatibility

type CreateClientRequest

type CreateClientRequest struct {
	Name  string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty" conform:"trim" validate:"required,max=50"`
	Ip    string `protobuf:"bytes,2,opt,name=ip,proto3" json:"ip,omitempty" conform:"trim" validate:"required,ip,max=30"`
	Group string `protobuf:"bytes,3,opt,name=group,proto3" json:"group,omitempty" validate:"required,max=50" conform:"trim"`
	// contains filtered or unexported fields
}

func (*CreateClientRequest) Descriptor deprecated

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

Deprecated: Use CreateClientRequest.ProtoReflect.Descriptor instead.

func (*CreateClientRequest) GetGroup

func (x *CreateClientRequest) GetGroup() string

func (*CreateClientRequest) GetIp

func (x *CreateClientRequest) GetIp() string

func (*CreateClientRequest) GetName

func (x *CreateClientRequest) GetName() string

func (*CreateClientRequest) ProtoMessage

func (*CreateClientRequest) ProtoMessage()

func (*CreateClientRequest) ProtoReflect

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

func (*CreateClientRequest) Reset

func (x *CreateClientRequest) Reset()

func (*CreateClientRequest) String

func (x *CreateClientRequest) String() string

type CreateClientResponse

type CreateClientResponse struct {
	Id        uint64              `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"`
	Users     []*common.LinuxUser `protobuf:"bytes,2,rep,name=users,proto3" json:"users,omitempty"`
	PublicKey string              `protobuf:"bytes,3,opt,name=public_key,json=publicKey,proto3" json:"public_key,omitempty"`
	// contains filtered or unexported fields
}

func (*CreateClientResponse) Descriptor deprecated

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

Deprecated: Use CreateClientResponse.ProtoReflect.Descriptor instead.

func (*CreateClientResponse) GetId

func (x *CreateClientResponse) GetId() uint64

func (*CreateClientResponse) GetPublicKey

func (x *CreateClientResponse) GetPublicKey() string

func (*CreateClientResponse) GetUsers

func (x *CreateClientResponse) GetUsers() []*common.LinuxUser

func (*CreateClientResponse) ProtoMessage

func (*CreateClientResponse) ProtoMessage()

func (*CreateClientResponse) ProtoReflect

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

func (*CreateClientResponse) Reset

func (x *CreateClientResponse) Reset()

func (*CreateClientResponse) String

func (x *CreateClientResponse) String() string

type DeleteClientRequest

type DeleteClientRequest struct {
	Id uint64 `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"`
	// contains filtered or unexported fields
}

func (*DeleteClientRequest) Descriptor deprecated

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

Deprecated: Use DeleteClientRequest.ProtoReflect.Descriptor instead.

func (*DeleteClientRequest) GetId

func (x *DeleteClientRequest) GetId() uint64

func (*DeleteClientRequest) ProtoMessage

func (*DeleteClientRequest) ProtoMessage()

func (*DeleteClientRequest) ProtoReflect

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

func (*DeleteClientRequest) Reset

func (x *DeleteClientRequest) Reset()

func (*DeleteClientRequest) String

func (x *DeleteClientRequest) String() string

type UnimplementedClientServiceServer

type UnimplementedClientServiceServer struct {
}

UnimplementedClientServiceServer must be embedded to have forward compatible implementations.

func (UnimplementedClientServiceServer) Create

func (UnimplementedClientServiceServer) Delete

type UnsafeClientServiceServer

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

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

Jump to

Keyboard shortcuts

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