gatewayv1

package
v0.4.3 Latest Latest
Warning

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

Go to latest
Published: Dec 20, 2025 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

View Source
const (
	WireGuardService_CreatePeer_FullMethodName = "/gateway.v1.WireGuardService/CreatePeer"
	WireGuardService_GetPeer_FullMethodName    = "/gateway.v1.WireGuardService/GetPeer"
	WireGuardService_ListPeer_FullMethodName   = "/gateway.v1.WireGuardService/ListPeer"
	WireGuardService_UpdatePeer_FullMethodName = "/gateway.v1.WireGuardService/UpdatePeer"
	WireGuardService_DeletePeer_FullMethodName = "/gateway.v1.WireGuardService/DeletePeer"
)

Variables

View Source
var File_gateway_v1_peer_proto protoreflect.FileDescriptor
View Source
var WireGuardService_ServiceDesc = grpc.ServiceDesc{
	ServiceName: "gateway.v1.WireGuardService",
	HandlerType: (*WireGuardServiceServer)(nil),
	Methods: []grpc.MethodDesc{
		{
			MethodName: "CreatePeer",
			Handler:    _WireGuardService_CreatePeer_Handler,
		},
		{
			MethodName: "GetPeer",
			Handler:    _WireGuardService_GetPeer_Handler,
		},
		{
			MethodName: "ListPeer",
			Handler:    _WireGuardService_ListPeer_Handler,
		},
		{
			MethodName: "UpdatePeer",
			Handler:    _WireGuardService_UpdatePeer_Handler,
		},
		{
			MethodName: "DeletePeer",
			Handler:    _WireGuardService_DeletePeer_Handler,
		},
	},
	Streams:  []grpc.StreamDesc{},
	Metadata: "gateway/v1/peer.proto",
}

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

Functions

func RegisterWireGuardServiceServer

func RegisterWireGuardServiceServer(s grpc.ServiceRegistrar, srv WireGuardServiceServer)

Types

type CreatePeerRequest

type CreatePeerRequest struct {
	Iface             string   `protobuf:"bytes,1,opt,name=iface,proto3" json:"iface,omitempty"`
	Name              string   `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty"`
	PublicKey         string   `protobuf:"bytes,3,opt,name=public_key,json=publicKey,proto3" json:"public_key,omitempty"`
	AllowedCidrs      []string `protobuf:"bytes,4,rep,name=allowed_cidrs,json=allowedCidrs,proto3" json:"allowed_cidrs,omitempty"`
	Endpoint          string   `protobuf:"bytes,5,opt,name=endpoint,proto3" json:"endpoint,omitempty"`
	KeepaliveSeconds  int32    `protobuf:"varint,6,opt,name=keepalive_seconds,json=keepaliveSeconds,proto3" json:"keepalive_seconds,omitempty"`
	ReplaceAllowedIps bool     `protobuf:"varint,7,opt,name=replace_allowed_ips,json=replaceAllowedIps,proto3" json:"replace_allowed_ips,omitempty"`
	// contains filtered or unexported fields
}

func (*CreatePeerRequest) Descriptor deprecated

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

Deprecated: Use CreatePeerRequest.ProtoReflect.Descriptor instead.

func (*CreatePeerRequest) GetAllowedCidrs

func (x *CreatePeerRequest) GetAllowedCidrs() []string

func (*CreatePeerRequest) GetEndpoint

func (x *CreatePeerRequest) GetEndpoint() string

func (*CreatePeerRequest) GetIface

func (x *CreatePeerRequest) GetIface() string

func (*CreatePeerRequest) GetKeepaliveSeconds

func (x *CreatePeerRequest) GetKeepaliveSeconds() int32

func (*CreatePeerRequest) GetName

func (x *CreatePeerRequest) GetName() string

func (*CreatePeerRequest) GetPublicKey

func (x *CreatePeerRequest) GetPublicKey() string

func (*CreatePeerRequest) GetReplaceAllowedIps

func (x *CreatePeerRequest) GetReplaceAllowedIps() bool

func (*CreatePeerRequest) ProtoMessage

func (*CreatePeerRequest) ProtoMessage()

func (*CreatePeerRequest) ProtoReflect

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

func (*CreatePeerRequest) Reset

func (x *CreatePeerRequest) Reset()

func (*CreatePeerRequest) String

func (x *CreatePeerRequest) String() string

type CreatePeerResponse

type CreatePeerResponse struct {
	Iface         string `protobuf:"bytes,1,opt,name=iface,proto3" json:"iface,omitempty"`
	Name          string `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty"`
	PublicKey     string `protobuf:"bytes,3,opt,name=public_key,json=publicKey,proto3" json:"public_key,omitempty"`
	ConfigApplied bool   `protobuf:"varint,4,opt,name=config_applied,json=configApplied,proto3" json:"config_applied,omitempty"`
	// contains filtered or unexported fields
}

func (*CreatePeerResponse) Descriptor deprecated

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

Deprecated: Use CreatePeerResponse.ProtoReflect.Descriptor instead.

func (*CreatePeerResponse) GetConfigApplied

func (x *CreatePeerResponse) GetConfigApplied() bool

func (*CreatePeerResponse) GetIface

func (x *CreatePeerResponse) GetIface() string

func (*CreatePeerResponse) GetName

func (x *CreatePeerResponse) GetName() string

func (*CreatePeerResponse) GetPublicKey

func (x *CreatePeerResponse) GetPublicKey() string

func (*CreatePeerResponse) ProtoMessage

func (*CreatePeerResponse) ProtoMessage()

func (*CreatePeerResponse) ProtoReflect

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

func (*CreatePeerResponse) Reset

func (x *CreatePeerResponse) Reset()

func (*CreatePeerResponse) String

func (x *CreatePeerResponse) String() string

type DeletePeerRequest

type DeletePeerRequest struct {
	Iface     string `protobuf:"bytes,1,opt,name=iface,proto3" json:"iface,omitempty"`
	PublicKey string `protobuf:"bytes,2,opt,name=public_key,json=publicKey,proto3" json:"public_key,omitempty"`
	// contains filtered or unexported fields
}

func (*DeletePeerRequest) Descriptor deprecated

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

Deprecated: Use DeletePeerRequest.ProtoReflect.Descriptor instead.

func (*DeletePeerRequest) GetIface

func (x *DeletePeerRequest) GetIface() string

func (*DeletePeerRequest) GetPublicKey

func (x *DeletePeerRequest) GetPublicKey() string

func (*DeletePeerRequest) ProtoMessage

func (*DeletePeerRequest) ProtoMessage()

func (*DeletePeerRequest) ProtoReflect

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

func (*DeletePeerRequest) Reset

func (x *DeletePeerRequest) Reset()

func (*DeletePeerRequest) String

func (x *DeletePeerRequest) String() string

type DeletePeerResponse

type DeletePeerResponse struct {
	Iface     string `protobuf:"bytes,1,opt,name=iface,proto3" json:"iface,omitempty"`
	PublicKey string `protobuf:"bytes,2,opt,name=public_key,json=publicKey,proto3" json:"public_key,omitempty"`
	Removed   bool   `protobuf:"varint,3,opt,name=removed,proto3" json:"removed,omitempty"`
	// contains filtered or unexported fields
}

func (*DeletePeerResponse) Descriptor deprecated

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

Deprecated: Use DeletePeerResponse.ProtoReflect.Descriptor instead.

func (*DeletePeerResponse) GetIface

func (x *DeletePeerResponse) GetIface() string

func (*DeletePeerResponse) GetPublicKey

func (x *DeletePeerResponse) GetPublicKey() string

func (*DeletePeerResponse) GetRemoved

func (x *DeletePeerResponse) GetRemoved() bool

func (*DeletePeerResponse) ProtoMessage

func (*DeletePeerResponse) ProtoMessage()

func (*DeletePeerResponse) ProtoReflect

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

func (*DeletePeerResponse) Reset

func (x *DeletePeerResponse) Reset()

func (*DeletePeerResponse) String

func (x *DeletePeerResponse) String() string

type DeviceStatus

type DeviceStatus struct {
	Iface        string        `protobuf:"bytes,1,opt,name=iface,proto3" json:"iface,omitempty"`
	ListenPort   int32         `protobuf:"varint,2,opt,name=listen_port,json=listenPort,proto3" json:"listen_port,omitempty"`
	FirewallMark int32         `protobuf:"varint,3,opt,name=firewall_mark,json=firewallMark,proto3" json:"firewall_mark,omitempty"`
	PublicKey    string        `protobuf:"bytes,4,opt,name=public_key,json=publicKey,proto3" json:"public_key,omitempty"`
	Peers        []*PeerStatus `protobuf:"bytes,5,rep,name=peers,proto3" json:"peers,omitempty"`
	// contains filtered or unexported fields
}

overall wiregaurd state

func (*DeviceStatus) Descriptor deprecated

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

Deprecated: Use DeviceStatus.ProtoReflect.Descriptor instead.

func (*DeviceStatus) GetFirewallMark

func (x *DeviceStatus) GetFirewallMark() int32

func (*DeviceStatus) GetIface

func (x *DeviceStatus) GetIface() string

func (*DeviceStatus) GetListenPort

func (x *DeviceStatus) GetListenPort() int32

func (*DeviceStatus) GetPeers

func (x *DeviceStatus) GetPeers() []*PeerStatus

func (*DeviceStatus) GetPublicKey

func (x *DeviceStatus) GetPublicKey() string

func (*DeviceStatus) ProtoMessage

func (*DeviceStatus) ProtoMessage()

func (*DeviceStatus) ProtoReflect

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

func (*DeviceStatus) Reset

func (x *DeviceStatus) Reset()

func (*DeviceStatus) String

func (x *DeviceStatus) String() string

type GetPeerRequest

type GetPeerRequest struct {
	Iface     string `protobuf:"bytes,1,opt,name=iface,proto3" json:"iface,omitempty"`
	PublicKey string `protobuf:"bytes,2,opt,name=public_key,json=publicKey,proto3" json:"public_key,omitempty"`
	// contains filtered or unexported fields
}

func (*GetPeerRequest) Descriptor deprecated

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

Deprecated: Use GetPeerRequest.ProtoReflect.Descriptor instead.

func (*GetPeerRequest) GetIface

func (x *GetPeerRequest) GetIface() string

func (*GetPeerRequest) GetPublicKey

func (x *GetPeerRequest) GetPublicKey() string

func (*GetPeerRequest) ProtoMessage

func (*GetPeerRequest) ProtoMessage()

func (*GetPeerRequest) ProtoReflect

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

func (*GetPeerRequest) Reset

func (x *GetPeerRequest) Reset()

func (*GetPeerRequest) String

func (x *GetPeerRequest) String() string

type GetPeerResponse

type GetPeerResponse struct {
	Peer *PeerStatus `protobuf:"bytes,1,opt,name=peer,proto3" json:"peer,omitempty"`
	// contains filtered or unexported fields
}

func (*GetPeerResponse) Descriptor deprecated

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

Deprecated: Use GetPeerResponse.ProtoReflect.Descriptor instead.

func (*GetPeerResponse) GetPeer

func (x *GetPeerResponse) GetPeer() *PeerStatus

func (*GetPeerResponse) ProtoMessage

func (*GetPeerResponse) ProtoMessage()

func (*GetPeerResponse) ProtoReflect

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

func (*GetPeerResponse) Reset

func (x *GetPeerResponse) Reset()

func (*GetPeerResponse) String

func (x *GetPeerResponse) String() string

type ListPeerRequest

type ListPeerRequest struct {
	Iface string `protobuf:"bytes,1,opt,name=iface,proto3" json:"iface,omitempty"`
	// contains filtered or unexported fields
}

func (*ListPeerRequest) Descriptor deprecated

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

Deprecated: Use ListPeerRequest.ProtoReflect.Descriptor instead.

func (*ListPeerRequest) GetIface

func (x *ListPeerRequest) GetIface() string

func (*ListPeerRequest) ProtoMessage

func (*ListPeerRequest) ProtoMessage()

func (*ListPeerRequest) ProtoReflect

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

func (*ListPeerRequest) Reset

func (x *ListPeerRequest) Reset()

func (*ListPeerRequest) String

func (x *ListPeerRequest) String() string

type ListPeerResponse

type ListPeerResponse struct {
	Peers []*PeerStatus `protobuf:"bytes,1,rep,name=peers,proto3" json:"peers,omitempty"`
	// contains filtered or unexported fields
}

func (*ListPeerResponse) Descriptor deprecated

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

Deprecated: Use ListPeerResponse.ProtoReflect.Descriptor instead.

func (*ListPeerResponse) GetPeers

func (x *ListPeerResponse) GetPeers() []*PeerStatus

func (*ListPeerResponse) ProtoMessage

func (*ListPeerResponse) ProtoMessage()

func (*ListPeerResponse) ProtoReflect

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

func (*ListPeerResponse) Reset

func (x *ListPeerResponse) Reset()

func (*ListPeerResponse) String

func (x *ListPeerResponse) String() string

type PeerStatus

type PeerStatus struct {
	PublicKey  string   `protobuf:"bytes,1,opt,name=public_key,json=publicKey,proto3" json:"public_key,omitempty"`
	Endpoint   string   `protobuf:"bytes,2,opt,name=endpoint,proto3" json:"endpoint,omitempty"`
	AllowedIps []string `protobuf:"bytes,3,rep,name=allowed_ips,json=allowedIps,proto3" json:"allowed_ips,omitempty"`
	Handshake  string   `protobuf:"bytes,4,opt,name=handshake,proto3" json:"handshake,omitempty"`
	RxBytes    uint64   `protobuf:"varint,5,opt,name=rx_bytes,json=rxBytes,proto3" json:"rx_bytes,omitempty"`
	TxBytes    uint64   `protobuf:"varint,6,opt,name=tx_bytes,json=txBytes,proto3" json:"tx_bytes,omitempty"`
	Keepalive  string   `protobuf:"bytes,7,opt,name=keepalive,proto3" json:"keepalive,omitempty"`
	// contains filtered or unexported fields
}

func (*PeerStatus) Descriptor deprecated

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

Deprecated: Use PeerStatus.ProtoReflect.Descriptor instead.

func (*PeerStatus) GetAllowedIps

func (x *PeerStatus) GetAllowedIps() []string

func (*PeerStatus) GetEndpoint

func (x *PeerStatus) GetEndpoint() string

func (*PeerStatus) GetHandshake

func (x *PeerStatus) GetHandshake() string

func (*PeerStatus) GetKeepalive

func (x *PeerStatus) GetKeepalive() string

func (*PeerStatus) GetPublicKey

func (x *PeerStatus) GetPublicKey() string

func (*PeerStatus) GetRxBytes

func (x *PeerStatus) GetRxBytes() uint64

func (*PeerStatus) GetTxBytes

func (x *PeerStatus) GetTxBytes() uint64

func (*PeerStatus) ProtoMessage

func (*PeerStatus) ProtoMessage()

func (*PeerStatus) ProtoReflect

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

func (*PeerStatus) Reset

func (x *PeerStatus) Reset()

func (*PeerStatus) String

func (x *PeerStatus) String() string

type UnimplementedWireGuardServiceServer

type UnimplementedWireGuardServiceServer struct{}

UnimplementedWireGuardServiceServer must be embedded to have forward compatible implementations.

NOTE: this should be embedded by value instead of pointer to avoid a nil pointer dereference when methods are called.

func (UnimplementedWireGuardServiceServer) CreatePeer

func (UnimplementedWireGuardServiceServer) DeletePeer

func (UnimplementedWireGuardServiceServer) GetPeer

func (UnimplementedWireGuardServiceServer) ListPeer

func (UnimplementedWireGuardServiceServer) UpdatePeer

type UnsafeWireGuardServiceServer

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

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

type UpdatePeerRequest

type UpdatePeerRequest struct {
	Iface              string   `protobuf:"bytes,1,opt,name=iface,proto3" json:"iface,omitempty"`
	PublicKey          string   `protobuf:"bytes,2,opt,name=public_key,json=publicKey,proto3" json:"public_key,omitempty"`
	SetAllowedCidrs    []string `protobuf:"bytes,3,rep,name=set_allowed_cidrs,json=setAllowedCidrs,proto3" json:"set_allowed_cidrs,omitempty"`
	AppendAllowedCidrs []string `protobuf:"bytes,4,rep,name=append_allowed_cidrs,json=appendAllowedCidrs,proto3" json:"append_allowed_cidrs,omitempty"`
	Endpoint           string   `protobuf:"bytes,5,opt,name=endpoint,proto3" json:"endpoint,omitempty"`
	KeepaliveSeconds   int32    `protobuf:"varint,6,opt,name=keepalive_seconds,json=keepaliveSeconds,proto3" json:"keepalive_seconds,omitempty"`
	// contains filtered or unexported fields
}

func (*UpdatePeerRequest) Descriptor deprecated

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

Deprecated: Use UpdatePeerRequest.ProtoReflect.Descriptor instead.

func (*UpdatePeerRequest) GetAppendAllowedCidrs

func (x *UpdatePeerRequest) GetAppendAllowedCidrs() []string

func (*UpdatePeerRequest) GetEndpoint

func (x *UpdatePeerRequest) GetEndpoint() string

func (*UpdatePeerRequest) GetIface

func (x *UpdatePeerRequest) GetIface() string

func (*UpdatePeerRequest) GetKeepaliveSeconds

func (x *UpdatePeerRequest) GetKeepaliveSeconds() int32

func (*UpdatePeerRequest) GetPublicKey

func (x *UpdatePeerRequest) GetPublicKey() string

func (*UpdatePeerRequest) GetSetAllowedCidrs

func (x *UpdatePeerRequest) GetSetAllowedCidrs() []string

func (*UpdatePeerRequest) ProtoMessage

func (*UpdatePeerRequest) ProtoMessage()

func (*UpdatePeerRequest) ProtoReflect

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

func (*UpdatePeerRequest) Reset

func (x *UpdatePeerRequest) Reset()

func (*UpdatePeerRequest) String

func (x *UpdatePeerRequest) String() string

type UpdatePeerResponse

type UpdatePeerResponse struct {
	Iface     string                      `protobuf:"bytes,1,opt,name=iface,proto3" json:"iface,omitempty"`
	PublicKey string                      `protobuf:"bytes,2,opt,name=public_key,json=publicKey,proto3" json:"public_key,omitempty"`
	Changed   *UpdatePeerResponse_Changed `protobuf:"bytes,3,opt,name=changed,proto3" json:"changed,omitempty"`
	// contains filtered or unexported fields
}

func (*UpdatePeerResponse) Descriptor deprecated

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

Deprecated: Use UpdatePeerResponse.ProtoReflect.Descriptor instead.

func (*UpdatePeerResponse) GetChanged

func (*UpdatePeerResponse) GetIface

func (x *UpdatePeerResponse) GetIface() string

func (*UpdatePeerResponse) GetPublicKey

func (x *UpdatePeerResponse) GetPublicKey() string

func (*UpdatePeerResponse) ProtoMessage

func (*UpdatePeerResponse) ProtoMessage()

func (*UpdatePeerResponse) ProtoReflect

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

func (*UpdatePeerResponse) Reset

func (x *UpdatePeerResponse) Reset()

func (*UpdatePeerResponse) String

func (x *UpdatePeerResponse) String() string

type UpdatePeerResponse_Changed

type UpdatePeerResponse_Changed struct {
	AllowedIps bool `protobuf:"varint,1,opt,name=allowed_ips,json=allowedIps,proto3" json:"allowed_ips,omitempty"`
	Endpoint   bool `protobuf:"varint,2,opt,name=endpoint,proto3" json:"endpoint,omitempty"`
	Keepalive  bool `protobuf:"varint,3,opt,name=keepalive,proto3" json:"keepalive,omitempty"`
	// contains filtered or unexported fields
}

func (*UpdatePeerResponse_Changed) Descriptor deprecated

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

Deprecated: Use UpdatePeerResponse_Changed.ProtoReflect.Descriptor instead.

func (*UpdatePeerResponse_Changed) GetAllowedIps

func (x *UpdatePeerResponse_Changed) GetAllowedIps() bool

func (*UpdatePeerResponse_Changed) GetEndpoint

func (x *UpdatePeerResponse_Changed) GetEndpoint() bool

func (*UpdatePeerResponse_Changed) GetKeepalive

func (x *UpdatePeerResponse_Changed) GetKeepalive() bool

func (*UpdatePeerResponse_Changed) ProtoMessage

func (*UpdatePeerResponse_Changed) ProtoMessage()

func (*UpdatePeerResponse_Changed) ProtoReflect

func (*UpdatePeerResponse_Changed) Reset

func (x *UpdatePeerResponse_Changed) Reset()

func (*UpdatePeerResponse_Changed) String

func (x *UpdatePeerResponse_Changed) String() string

type WireGuardServiceClient

type WireGuardServiceClient interface {
	CreatePeer(ctx context.Context, in *CreatePeerRequest, opts ...grpc.CallOption) (*CreatePeerResponse, error)
	GetPeer(ctx context.Context, in *GetPeerRequest, opts ...grpc.CallOption) (*GetPeerResponse, error)
	ListPeer(ctx context.Context, in *ListPeerRequest, opts ...grpc.CallOption) (*ListPeerResponse, error)
	UpdatePeer(ctx context.Context, in *UpdatePeerRequest, opts ...grpc.CallOption) (*UpdatePeerResponse, error)
	DeletePeer(ctx context.Context, in *DeletePeerRequest, opts ...grpc.CallOption) (*DeletePeerResponse, error)
}

WireGuardServiceClient is the client API for WireGuardService 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.

Wireguard Services

type WireGuardServiceServer

type WireGuardServiceServer interface {
	CreatePeer(context.Context, *CreatePeerRequest) (*CreatePeerResponse, error)
	GetPeer(context.Context, *GetPeerRequest) (*GetPeerResponse, error)
	ListPeer(context.Context, *ListPeerRequest) (*ListPeerResponse, error)
	UpdatePeer(context.Context, *UpdatePeerRequest) (*UpdatePeerResponse, error)
	DeletePeer(context.Context, *DeletePeerRequest) (*DeletePeerResponse, error)
	// contains filtered or unexported methods
}

WireGuardServiceServer is the server API for WireGuardService service. All implementations must embed UnimplementedWireGuardServiceServer for forward compatibility.

Wireguard Services

Jump to

Keyboard shortcuts

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