proto

package
v1.16.19 Latest Latest
Warning

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

Go to latest
Published: Nov 17, 2023 License: AGPL-3.0 Imports: 9 Imported by: 0

README

刷新 pb

cd .\internal\pkg\sshDev\proto\
protoc --go_out=. --go-grpc_out=. .\ssh.proto

Documentation

Index

Constants

View Source
const (
	SshAccounts_Watch_FullMethodName = "/proto.SshAccounts/Watch"
)

Variables

View Source
var SshAccounts_ServiceDesc = grpc.ServiceDesc{
	ServiceName: "proto.SshAccounts",
	HandlerType: (*SshAccountsServer)(nil),
	Methods:     []grpc.MethodDesc{},
	Streams: []grpc.StreamDesc{
		{
			StreamName:    "Watch",
			Handler:       _SshAccounts_Watch_Handler,
			ServerStreams: true,
		},
	},
	Metadata: "ssh.proto",
}

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

Functions

func RegisterSshAccountsServer

func RegisterSshAccountsServer(s grpc.ServiceRegistrar, srv SshAccountsServer)

Types

type AccountStream

type AccountStream struct {
	IsInit      bool          `protobuf:"varint,1,opt,name=is_init,json=isInit,proto3" json:"is_init,omitempty"`
	IsHeartBeat bool          `protobuf:"varint,2,opt,name=is_heart_beat,json=isHeartBeat,proto3" json:"is_heart_beat,omitempty"`
	Accounts    []*SshAccount `protobuf:"bytes,3,rep,name=accounts,proto3" json:"accounts,omitempty"`
	// contains filtered or unexported fields
}

func (*AccountStream) Descriptor deprecated

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

Deprecated: Use AccountStream.ProtoReflect.Descriptor instead.

func (*AccountStream) GetAccounts

func (x *AccountStream) GetAccounts() []*SshAccount

func (*AccountStream) GetIsHeartBeat

func (x *AccountStream) GetIsHeartBeat() bool

func (*AccountStream) GetIsInit

func (x *AccountStream) GetIsInit() bool

func (*AccountStream) ProtoMessage

func (*AccountStream) ProtoMessage()

func (*AccountStream) ProtoReflect

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

func (*AccountStream) Reset

func (x *AccountStream) Reset()

func (*AccountStream) String

func (x *AccountStream) String() string

type SshAccount

type SshAccount struct {
	IsDel     bool   `protobuf:"varint,1,opt,name=is_del,json=isDel,proto3" json:"is_del,omitempty"`
	IsKill    bool   `protobuf:"varint,2,opt,name=is_kill,json=isKill,proto3" json:"is_kill,omitempty"`
	Username  string `protobuf:"bytes,3,opt,name=username,proto3" json:"username,omitempty"`
	PublicKey string `protobuf:"bytes,4,opt,name=public_key,json=publicKey,proto3" json:"public_key,omitempty"`
	// contains filtered or unexported fields
}

func (*SshAccount) Descriptor deprecated

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

Deprecated: Use SshAccount.ProtoReflect.Descriptor instead.

func (*SshAccount) GetIsDel

func (x *SshAccount) GetIsDel() bool

func (*SshAccount) GetIsKill

func (x *SshAccount) GetIsKill() bool

func (*SshAccount) GetPublicKey

func (x *SshAccount) GetPublicKey() string

func (*SshAccount) GetUsername

func (x *SshAccount) GetUsername() string

func (*SshAccount) ProtoMessage

func (*SshAccount) ProtoMessage()

func (*SshAccount) ProtoReflect

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

func (*SshAccount) Reset

func (x *SshAccount) Reset()

func (*SshAccount) String

func (x *SshAccount) String() string

type SshAccountsClient

type SshAccountsClient interface {
	Watch(ctx context.Context, in *emptypb.Empty, opts ...grpc.CallOption) (SshAccounts_WatchClient, error)
}

SshAccountsClient is the client API for SshAccounts 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 SshAccountsServer

type SshAccountsServer interface {
	Watch(*emptypb.Empty, SshAccounts_WatchServer) error
	// contains filtered or unexported methods
}

SshAccountsServer is the server API for SshAccounts service. All implementations must embed UnimplementedSshAccountsServer for forward compatibility

type SshAccounts_WatchClient

type SshAccounts_WatchClient interface {
	Recv() (*AccountStream, error)
	grpc.ClientStream
}

type SshAccounts_WatchServer

type SshAccounts_WatchServer interface {
	Send(*AccountStream) error
	grpc.ServerStream
}

type UnimplementedSshAccountsServer

type UnimplementedSshAccountsServer struct {
}

UnimplementedSshAccountsServer must be embedded to have forward compatible implementations.

func (UnimplementedSshAccountsServer) Watch

type UnsafeSshAccountsServer

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

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

Jump to

Keyboard shortcuts

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