proto

package
v0.4.6 Latest Latest
Warning

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

Go to latest
Published: Jan 9, 2021 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func RegisterDevicesServer

func RegisterDevicesServer(s *grpc.Server, srv DevicesServer)

func RegisterServerServer

func RegisterServerServer(s *grpc.Server, srv ServerServer)

Types

type AddDeviceReq

type AddDeviceReq struct {
	Name                 string   `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
	PublicKey            string   `protobuf:"bytes,2,opt,name=public_key,json=publicKey,proto3" json:"public_key,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

func (*AddDeviceReq) Descriptor

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

func (*AddDeviceReq) GetName

func (m *AddDeviceReq) GetName() string

func (*AddDeviceReq) GetPublicKey

func (m *AddDeviceReq) GetPublicKey() string

func (*AddDeviceReq) ProtoMessage

func (*AddDeviceReq) ProtoMessage()

func (*AddDeviceReq) Reset

func (m *AddDeviceReq) Reset()

func (*AddDeviceReq) String

func (m *AddDeviceReq) String() string

func (*AddDeviceReq) XXX_DiscardUnknown

func (m *AddDeviceReq) XXX_DiscardUnknown()

func (*AddDeviceReq) XXX_Marshal

func (m *AddDeviceReq) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*AddDeviceReq) XXX_Merge

func (m *AddDeviceReq) XXX_Merge(src proto.Message)

func (*AddDeviceReq) XXX_Size

func (m *AddDeviceReq) XXX_Size() int

func (*AddDeviceReq) XXX_Unmarshal

func (m *AddDeviceReq) XXX_Unmarshal(b []byte) error

type DeleteDeviceReq

type DeleteDeviceReq struct {
	Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
	// admin's may delete a device owned
	// by someone other than the current user
	// if empty, defaults to the current user
	Owner                *wrappers.StringValue `protobuf:"bytes,2,opt,name=owner,proto3" json:"owner,omitempty"`
	XXX_NoUnkeyedLiteral struct{}              `json:"-"`
	XXX_unrecognized     []byte                `json:"-"`
	XXX_sizecache        int32                 `json:"-"`
}

func (*DeleteDeviceReq) Descriptor

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

func (*DeleteDeviceReq) GetName

func (m *DeleteDeviceReq) GetName() string

func (*DeleteDeviceReq) GetOwner added in v0.3.0

func (m *DeleteDeviceReq) GetOwner() *wrappers.StringValue

func (*DeleteDeviceReq) ProtoMessage

func (*DeleteDeviceReq) ProtoMessage()

func (*DeleteDeviceReq) Reset

func (m *DeleteDeviceReq) Reset()

func (*DeleteDeviceReq) String

func (m *DeleteDeviceReq) String() string

func (*DeleteDeviceReq) XXX_DiscardUnknown

func (m *DeleteDeviceReq) XXX_DiscardUnknown()

func (*DeleteDeviceReq) XXX_Marshal

func (m *DeleteDeviceReq) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*DeleteDeviceReq) XXX_Merge

func (m *DeleteDeviceReq) XXX_Merge(src proto.Message)

func (*DeleteDeviceReq) XXX_Size

func (m *DeleteDeviceReq) XXX_Size() int

func (*DeleteDeviceReq) XXX_Unmarshal

func (m *DeleteDeviceReq) XXX_Unmarshal(b []byte) error

type Device

type Device struct {
	Name                 string               `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
	Owner                string               `protobuf:"bytes,2,opt,name=owner,proto3" json:"owner,omitempty"`
	PublicKey            string               `protobuf:"bytes,3,opt,name=public_key,json=publicKey,proto3" json:"public_key,omitempty"`
	Address              string               `protobuf:"bytes,4,opt,name=address,proto3" json:"address,omitempty"`
	CreatedAt            *timestamp.Timestamp `protobuf:"bytes,5,opt,name=created_at,json=createdAt,proto3" json:"created_at,omitempty"`
	Connected            bool                 `protobuf:"varint,6,opt,name=connected,proto3" json:"connected,omitempty"`
	LastHandshakeTime    *timestamp.Timestamp `protobuf:"bytes,7,opt,name=last_handshake_time,json=lastHandshakeTime,proto3" json:"last_handshake_time,omitempty"`
	ReceiveBytes         int64                `protobuf:"varint,8,opt,name=receive_bytes,json=receiveBytes,proto3" json:"receive_bytes,omitempty"`
	TransmitBytes        int64                `protobuf:"varint,9,opt,name=transmit_bytes,json=transmitBytes,proto3" json:"transmit_bytes,omitempty"`
	Endpoint             string               `protobuf:"bytes,10,opt,name=endpoint,proto3" json:"endpoint,omitempty"`
	OwnerName            string               `protobuf:"bytes,11,opt,name=owner_name,json=ownerName,proto3" json:"owner_name,omitempty"`
	OwnerEmail           string               `protobuf:"bytes,12,opt,name=owner_email,json=ownerEmail,proto3" json:"owner_email,omitempty"`
	OwnerProvider        string               `protobuf:"bytes,13,opt,name=owner_provider,json=ownerProvider,proto3" json:"owner_provider,omitempty"`
	XXX_NoUnkeyedLiteral struct{}             `json:"-"`
	XXX_unrecognized     []byte               `json:"-"`
	XXX_sizecache        int32                `json:"-"`
}

func (*Device) Descriptor

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

func (*Device) GetAddress

func (m *Device) GetAddress() string

func (*Device) GetConnected

func (m *Device) GetConnected() bool

func (*Device) GetCreatedAt

func (m *Device) GetCreatedAt() *timestamp.Timestamp

func (*Device) GetEndpoint

func (m *Device) GetEndpoint() string

func (*Device) GetLastHandshakeTime

func (m *Device) GetLastHandshakeTime() *timestamp.Timestamp

func (*Device) GetName

func (m *Device) GetName() string

func (*Device) GetOwner

func (m *Device) GetOwner() string

func (*Device) GetOwnerEmail added in v0.3.0

func (m *Device) GetOwnerEmail() string

func (*Device) GetOwnerName added in v0.3.0

func (m *Device) GetOwnerName() string

func (*Device) GetOwnerProvider added in v0.3.0

func (m *Device) GetOwnerProvider() string

func (*Device) GetPublicKey

func (m *Device) GetPublicKey() string

func (*Device) GetReceiveBytes

func (m *Device) GetReceiveBytes() int64

func (*Device) GetTransmitBytes

func (m *Device) GetTransmitBytes() int64

func (*Device) ProtoMessage

func (*Device) ProtoMessage()

func (*Device) Reset

func (m *Device) Reset()

func (*Device) String

func (m *Device) String() string

func (*Device) XXX_DiscardUnknown

func (m *Device) XXX_DiscardUnknown()

func (*Device) XXX_Marshal

func (m *Device) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*Device) XXX_Merge

func (m *Device) XXX_Merge(src proto.Message)

func (*Device) XXX_Size

func (m *Device) XXX_Size() int

func (*Device) XXX_Unmarshal

func (m *Device) XXX_Unmarshal(b []byte) error

type DevicesClient

type DevicesClient interface {
	AddDevice(ctx context.Context, in *AddDeviceReq, opts ...grpc.CallOption) (*Device, error)
	ListDevices(ctx context.Context, in *ListDevicesReq, opts ...grpc.CallOption) (*ListDevicesRes, error)
	DeleteDevice(ctx context.Context, in *DeleteDeviceReq, opts ...grpc.CallOption) (*empty.Empty, error)
	// admin only
	ListAllDevices(ctx context.Context, in *ListAllDevicesReq, opts ...grpc.CallOption) (*ListAllDevicesRes, error)
}

DevicesClient is the client API for Devices service.

For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream.

func NewDevicesClient

func NewDevicesClient(cc grpc.ClientConnInterface) DevicesClient

type DevicesServer

type DevicesServer interface {
	AddDevice(context.Context, *AddDeviceReq) (*Device, error)
	ListDevices(context.Context, *ListDevicesReq) (*ListDevicesRes, error)
	DeleteDevice(context.Context, *DeleteDeviceReq) (*empty.Empty, error)
	// admin only
	ListAllDevices(context.Context, *ListAllDevicesReq) (*ListAllDevicesRes, error)
}

DevicesServer is the server API for Devices service.

type InfoReq

type InfoReq struct {
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

func (*InfoReq) Descriptor

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

func (*InfoReq) ProtoMessage

func (*InfoReq) ProtoMessage()

func (*InfoReq) Reset

func (m *InfoReq) Reset()

func (*InfoReq) String

func (m *InfoReq) String() string

func (*InfoReq) XXX_DiscardUnknown

func (m *InfoReq) XXX_DiscardUnknown()

func (*InfoReq) XXX_Marshal

func (m *InfoReq) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*InfoReq) XXX_Merge

func (m *InfoReq) XXX_Merge(src proto.Message)

func (*InfoReq) XXX_Size

func (m *InfoReq) XXX_Size() int

func (*InfoReq) XXX_Unmarshal

func (m *InfoReq) XXX_Unmarshal(b []byte) error

type InfoRes

type InfoRes struct {
	PublicKey            string                `protobuf:"bytes,1,opt,name=public_key,json=publicKey,proto3" json:"public_key,omitempty"`
	Host                 *wrappers.StringValue `protobuf:"bytes,2,opt,name=host,proto3" json:"host,omitempty"`
	Port                 int32                 `protobuf:"varint,3,opt,name=port,proto3" json:"port,omitempty"`
	HostVpnIp            string                `protobuf:"bytes,4,opt,name=host_vpn_ip,json=hostVpnIp,proto3" json:"host_vpn_ip,omitempty"`
	MetadataEnabled      bool                  `protobuf:"varint,5,opt,name=metadata_enabled,json=metadataEnabled,proto3" json:"metadata_enabled,omitempty"`
	IsAdmin              bool                  `protobuf:"varint,6,opt,name=is_admin,json=isAdmin,proto3" json:"is_admin,omitempty"`
	AllowedIps           string                `protobuf:"bytes,7,opt,name=allowed_ips,json=allowedIps,proto3" json:"allowed_ips,omitempty"`
	DnsEnabled           bool                  `protobuf:"varint,8,opt,name=dns_enabled,json=dnsEnabled,proto3" json:"dns_enabled,omitempty"`
	DnsAddress           string                `protobuf:"bytes,9,opt,name=dns_address,json=dnsAddress,proto3" json:"dns_address,omitempty"`
	XXX_NoUnkeyedLiteral struct{}              `json:"-"`
	XXX_unrecognized     []byte                `json:"-"`
	XXX_sizecache        int32                 `json:"-"`
}

func (*InfoRes) Descriptor

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

func (*InfoRes) GetAllowedIps added in v0.3.0

func (m *InfoRes) GetAllowedIps() string

func (*InfoRes) GetDnsAddress added in v0.3.0

func (m *InfoRes) GetDnsAddress() string

func (*InfoRes) GetDnsEnabled added in v0.3.0

func (m *InfoRes) GetDnsEnabled() bool

func (*InfoRes) GetHost

func (m *InfoRes) GetHost() *wrappers.StringValue

func (*InfoRes) GetHostVpnIp

func (m *InfoRes) GetHostVpnIp() string

func (*InfoRes) GetIsAdmin

func (m *InfoRes) GetIsAdmin() bool

func (*InfoRes) GetMetadataEnabled

func (m *InfoRes) GetMetadataEnabled() bool

func (*InfoRes) GetPort

func (m *InfoRes) GetPort() int32

func (*InfoRes) GetPublicKey

func (m *InfoRes) GetPublicKey() string

func (*InfoRes) ProtoMessage

func (*InfoRes) ProtoMessage()

func (*InfoRes) Reset

func (m *InfoRes) Reset()

func (*InfoRes) String

func (m *InfoRes) String() string

func (*InfoRes) XXX_DiscardUnknown

func (m *InfoRes) XXX_DiscardUnknown()

func (*InfoRes) XXX_Marshal

func (m *InfoRes) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*InfoRes) XXX_Merge

func (m *InfoRes) XXX_Merge(src proto.Message)

func (*InfoRes) XXX_Size

func (m *InfoRes) XXX_Size() int

func (*InfoRes) XXX_Unmarshal

func (m *InfoRes) XXX_Unmarshal(b []byte) error

type ListAllDevicesReq

type ListAllDevicesReq struct {
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

func (*ListAllDevicesReq) Descriptor

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

func (*ListAllDevicesReq) ProtoMessage

func (*ListAllDevicesReq) ProtoMessage()

func (*ListAllDevicesReq) Reset

func (m *ListAllDevicesReq) Reset()

func (*ListAllDevicesReq) String

func (m *ListAllDevicesReq) String() string

func (*ListAllDevicesReq) XXX_DiscardUnknown

func (m *ListAllDevicesReq) XXX_DiscardUnknown()

func (*ListAllDevicesReq) XXX_Marshal

func (m *ListAllDevicesReq) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*ListAllDevicesReq) XXX_Merge

func (m *ListAllDevicesReq) XXX_Merge(src proto.Message)

func (*ListAllDevicesReq) XXX_Size

func (m *ListAllDevicesReq) XXX_Size() int

func (*ListAllDevicesReq) XXX_Unmarshal

func (m *ListAllDevicesReq) XXX_Unmarshal(b []byte) error

type ListAllDevicesRes

type ListAllDevicesRes struct {
	Items                []*Device `protobuf:"bytes,1,rep,name=items,proto3" json:"items,omitempty"`
	XXX_NoUnkeyedLiteral struct{}  `json:"-"`
	XXX_unrecognized     []byte    `json:"-"`
	XXX_sizecache        int32     `json:"-"`
}

func (*ListAllDevicesRes) Descriptor

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

func (*ListAllDevicesRes) GetItems

func (m *ListAllDevicesRes) GetItems() []*Device

func (*ListAllDevicesRes) ProtoMessage

func (*ListAllDevicesRes) ProtoMessage()

func (*ListAllDevicesRes) Reset

func (m *ListAllDevicesRes) Reset()

func (*ListAllDevicesRes) String

func (m *ListAllDevicesRes) String() string

func (*ListAllDevicesRes) XXX_DiscardUnknown

func (m *ListAllDevicesRes) XXX_DiscardUnknown()

func (*ListAllDevicesRes) XXX_Marshal

func (m *ListAllDevicesRes) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*ListAllDevicesRes) XXX_Merge

func (m *ListAllDevicesRes) XXX_Merge(src proto.Message)

func (*ListAllDevicesRes) XXX_Size

func (m *ListAllDevicesRes) XXX_Size() int

func (*ListAllDevicesRes) XXX_Unmarshal

func (m *ListAllDevicesRes) XXX_Unmarshal(b []byte) error

type ListDevicesReq

type ListDevicesReq struct {
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

func (*ListDevicesReq) Descriptor

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

func (*ListDevicesReq) ProtoMessage

func (*ListDevicesReq) ProtoMessage()

func (*ListDevicesReq) Reset

func (m *ListDevicesReq) Reset()

func (*ListDevicesReq) String

func (m *ListDevicesReq) String() string

func (*ListDevicesReq) XXX_DiscardUnknown

func (m *ListDevicesReq) XXX_DiscardUnknown()

func (*ListDevicesReq) XXX_Marshal

func (m *ListDevicesReq) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*ListDevicesReq) XXX_Merge

func (m *ListDevicesReq) XXX_Merge(src proto.Message)

func (*ListDevicesReq) XXX_Size

func (m *ListDevicesReq) XXX_Size() int

func (*ListDevicesReq) XXX_Unmarshal

func (m *ListDevicesReq) XXX_Unmarshal(b []byte) error

type ListDevicesRes

type ListDevicesRes struct {
	Items                []*Device `protobuf:"bytes,1,rep,name=items,proto3" json:"items,omitempty"`
	XXX_NoUnkeyedLiteral struct{}  `json:"-"`
	XXX_unrecognized     []byte    `json:"-"`
	XXX_sizecache        int32     `json:"-"`
}

func (*ListDevicesRes) Descriptor

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

func (*ListDevicesRes) GetItems

func (m *ListDevicesRes) GetItems() []*Device

func (*ListDevicesRes) ProtoMessage

func (*ListDevicesRes) ProtoMessage()

func (*ListDevicesRes) Reset

func (m *ListDevicesRes) Reset()

func (*ListDevicesRes) String

func (m *ListDevicesRes) String() string

func (*ListDevicesRes) XXX_DiscardUnknown

func (m *ListDevicesRes) XXX_DiscardUnknown()

func (*ListDevicesRes) XXX_Marshal

func (m *ListDevicesRes) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*ListDevicesRes) XXX_Merge

func (m *ListDevicesRes) XXX_Merge(src proto.Message)

func (*ListDevicesRes) XXX_Size

func (m *ListDevicesRes) XXX_Size() int

func (*ListDevicesRes) XXX_Unmarshal

func (m *ListDevicesRes) XXX_Unmarshal(b []byte) error

type ServerClient

type ServerClient interface {
	Info(ctx context.Context, in *InfoReq, opts ...grpc.CallOption) (*InfoRes, error)
}

ServerClient is the client API for Server service.

For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream.

func NewServerClient

func NewServerClient(cc grpc.ClientConnInterface) ServerClient

type ServerServer

type ServerServer interface {
	Info(context.Context, *InfoReq) (*InfoRes, error)
}

ServerServer is the server API for Server service.

type UnimplementedDevicesServer

type UnimplementedDevicesServer struct {
}

UnimplementedDevicesServer can be embedded to have forward compatible implementations.

func (*UnimplementedDevicesServer) AddDevice

func (*UnimplementedDevicesServer) DeleteDevice

func (*UnimplementedDevicesServer) ListAllDevices

func (*UnimplementedDevicesServer) ListDevices

type UnimplementedServerServer

type UnimplementedServerServer struct {
}

UnimplementedServerServer can be embedded to have forward compatible implementations.

func (*UnimplementedServerServer) Info

Jump to

Keyboard shortcuts

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