model

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Jan 22, 2022 License: GPL-3.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var File_model_proto protoreflect.FileDescriptor

Functions

This section is empty.

Types

type Client

type Client struct {
	UUID                      string   `protobuf:"bytes,1,opt,name=UUID,proto3" json:"UUID,omitempty"`
	Name                      string   `protobuf:"bytes,2,opt,name=Name,proto3" json:"Name,omitempty"`
	Tags                      []string `protobuf:"bytes,3,rep,name=Tags,proto3" json:"Tags,omitempty"`
	Email                     string   `protobuf:"bytes,4,opt,name=Email,proto3" json:"Email,omitempty"`
	Enable                    bool     `protobuf:"varint,5,opt,name=Enable,proto3" json:"Enable,omitempty"`
	IgnorePersistentKeepalive bool     `protobuf:"varint,6,opt,name=IgnorePersistentKeepalive,proto3" json:"IgnorePersistentKeepalive,omitempty"`
	PresharedKey              string   `protobuf:"bytes,7,opt,name=PresharedKey,proto3" json:"PresharedKey,omitempty"`
	AllowedIPs                []string `protobuf:"bytes,8,rep,name=AllowedIPs,proto3" json:"AllowedIPs,omitempty"`
	Address                   []string `protobuf:"bytes,9,rep,name=Address,proto3" json:"Address,omitempty"`
	PrivateKey                string   `protobuf:"bytes,10,opt,name=PrivateKey,proto3" json:"PrivateKey,omitempty"`
	PublicKey                 string   `protobuf:"bytes,11,opt,name=PublicKey,proto3" json:"PublicKey,omitempty"`
	CreatedBy                 string   `protobuf:"bytes,12,opt,name=CreatedBy,proto3" json:"CreatedBy,omitempty"`
	UpdatedBy                 string   `protobuf:"bytes,13,opt,name=UpdatedBy,proto3" json:"UpdatedBy,omitempty"`
	Created                   int64    `protobuf:"varint,14,opt,name=Created,proto3" json:"Created,omitempty"`
	Updated                   int64    `protobuf:"varint,15,opt,name=Updated,proto3" json:"Updated,omitempty"`
	// contains filtered or unexported fields
}

func (*Client) Descriptor deprecated

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

Deprecated: Use Client.ProtoReflect.Descriptor instead.

func (*Client) GetAddress

func (x *Client) GetAddress() []string

func (*Client) GetAllowedIPs

func (x *Client) GetAllowedIPs() []string

func (*Client) GetCreated

func (x *Client) GetCreated() int64

func (*Client) GetCreatedBy

func (x *Client) GetCreatedBy() string

func (*Client) GetEmail

func (x *Client) GetEmail() string

func (*Client) GetEnable

func (x *Client) GetEnable() bool

func (*Client) GetIgnorePersistentKeepalive

func (x *Client) GetIgnorePersistentKeepalive() bool

func (*Client) GetName

func (x *Client) GetName() string

func (*Client) GetPresharedKey

func (x *Client) GetPresharedKey() string

func (*Client) GetPrivateKey

func (x *Client) GetPrivateKey() string

func (*Client) GetPublicKey

func (x *Client) GetPublicKey() string

func (*Client) GetTags

func (x *Client) GetTags() []string

func (*Client) GetUUID

func (x *Client) GetUUID() string

func (*Client) GetUpdated

func (x *Client) GetUpdated() int64

func (*Client) GetUpdatedBy

func (x *Client) GetUpdatedBy() string

func (Client) IsValid

func (a Client) IsValid() []error

IsValid check if model is valid

func (*Client) ProtoMessage

func (*Client) ProtoMessage()

func (*Client) ProtoReflect

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

func (*Client) Reset

func (x *Client) Reset()

func (*Client) String

func (x *Client) String() string

type Response

type Response struct {
	Status  int64     `protobuf:"varint,1,opt,name=status,proto3" json:"status,omitempty"`
	Sucess  bool      `protobuf:"varint,2,opt,name=sucess,proto3" json:"sucess,omitempty"`
	Message string    `protobuf:"bytes,3,opt,name=message,proto3" json:"message,omitempty"`
	Error   string    `protobuf:"bytes,4,opt,name=error,proto3" json:"error,omitempty"`
	Client  *Client   `protobuf:"bytes,5,opt,name=client,proto3" json:"client,omitempty"`
	Server  *Server   `protobuf:"bytes,6,opt,name=server,proto3" json:"server,omitempty"`
	Clients []*Client `protobuf:"bytes,7,rep,name=clients,proto3" json:"clients,omitempty"`
	// contains filtered or unexported fields
}

func (*Response) Descriptor deprecated

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

Deprecated: Use Response.ProtoReflect.Descriptor instead.

func (*Response) GetClient

func (x *Response) GetClient() *Client

func (*Response) GetClients

func (x *Response) GetClients() []*Client

func (*Response) GetError

func (x *Response) GetError() string

func (*Response) GetMessage

func (x *Response) GetMessage() string

func (*Response) GetServer

func (x *Response) GetServer() *Server

func (*Response) GetStatus

func (x *Response) GetStatus() int64

func (*Response) GetSucess

func (x *Response) GetSucess() bool

func (*Response) ProtoMessage

func (*Response) ProtoMessage()

func (*Response) ProtoReflect

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

func (*Response) Reset

func (x *Response) Reset()

func (*Response) String

func (x *Response) String() string

type Server

type Server struct {
	Address             []string `protobuf:"bytes,1,rep,name=Address,proto3" json:"Address,omitempty"`
	ListenPort          int64    `protobuf:"varint,2,opt,name=ListenPort,proto3" json:"ListenPort,omitempty"`
	Mtu                 int64    `protobuf:"varint,3,opt,name=Mtu,proto3" json:"Mtu,omitempty"`
	PrivateKey          string   `protobuf:"bytes,4,opt,name=PrivateKey,proto3" json:"PrivateKey,omitempty"`
	PublicKey           string   `protobuf:"bytes,5,opt,name=PublicKey,proto3" json:"PublicKey,omitempty"`
	Endpoint            string   `protobuf:"bytes,6,opt,name=Endpoint,proto3" json:"Endpoint,omitempty"`
	PersistentKeepalive int64    `protobuf:"varint,7,opt,name=PersistentKeepalive,proto3" json:"PersistentKeepalive,omitempty"`
	DNS                 []string `protobuf:"bytes,8,rep,name=DNS,proto3" json:"DNS,omitempty"`
	AllowedIPs          []string `protobuf:"bytes,9,rep,name=AllowedIPs,proto3" json:"AllowedIPs,omitempty"`
	PreUp               string   `protobuf:"bytes,10,opt,name=PreUp,proto3" json:"PreUp,omitempty"`
	PostUp              string   `protobuf:"bytes,11,opt,name=PostUp,proto3" json:"PostUp,omitempty"`
	PreDown             string   `protobuf:"bytes,12,opt,name=PreDown,proto3" json:"PreDown,omitempty"`
	PostDown            string   `protobuf:"bytes,13,opt,name=PostDown,proto3" json:"PostDown,omitempty"`
	UpdatedBy           string   `protobuf:"bytes,14,opt,name=UpdatedBy,proto3" json:"UpdatedBy,omitempty"`
	Created             int64    `protobuf:"varint,15,opt,name=Created,proto3" json:"Created,omitempty"`
	Updated             int64    `protobuf:"varint,16,opt,name=Updated,proto3" json:"Updated,omitempty"`
	// contains filtered or unexported fields
}

func (*Server) Descriptor deprecated

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

Deprecated: Use Server.ProtoReflect.Descriptor instead.

func (*Server) GetAddress

func (x *Server) GetAddress() []string

func (*Server) GetAllowedIPs

func (x *Server) GetAllowedIPs() []string

func (*Server) GetCreated

func (x *Server) GetCreated() int64

func (*Server) GetDNS

func (x *Server) GetDNS() []string

func (*Server) GetEndpoint

func (x *Server) GetEndpoint() string

func (*Server) GetListenPort

func (x *Server) GetListenPort() int64

func (*Server) GetMtu

func (x *Server) GetMtu() int64

func (*Server) GetPersistentKeepalive

func (x *Server) GetPersistentKeepalive() int64

func (*Server) GetPostDown

func (x *Server) GetPostDown() string

func (*Server) GetPostUp

func (x *Server) GetPostUp() string

func (*Server) GetPreDown

func (x *Server) GetPreDown() string

func (*Server) GetPreUp

func (x *Server) GetPreUp() string

func (*Server) GetPrivateKey

func (x *Server) GetPrivateKey() string

func (*Server) GetPublicKey

func (x *Server) GetPublicKey() string

func (*Server) GetUpdated

func (x *Server) GetUpdated() int64

func (*Server) GetUpdatedBy

func (x *Server) GetUpdatedBy() string

func (Server) IsValid

func (a Server) IsValid() []error

IsValid check if model is valid

func (*Server) ProtoMessage

func (*Server) ProtoMessage()

func (*Server) ProtoReflect

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

func (*Server) Reset

func (x *Server) Reset()

func (*Server) String

func (x *Server) String() string

type Status

type Status struct {
	Version   string `protobuf:"bytes,1,opt,name=Version,proto3" json:"Version,omitempty"`
	Hostname  string `protobuf:"bytes,2,opt,name=Hostname,proto3" json:"Hostname,omitempty"`
	Domain    string `protobuf:"bytes,3,opt,name=Domain,proto3" json:"Domain,omitempty"`
	PublicIP  string `protobuf:"bytes,4,opt,name=PublicIP,proto3" json:"PublicIP,omitempty"`
	GRPCPort  string `protobuf:"bytes,5,opt,name=gRPCPort,proto3" json:"gRPCPort,omitempty"`
	PrivateIP string `protobuf:"bytes,6,opt,name=PrivateIP,proto3" json:"PrivateIP,omitempty"`
	HttpPort  string `protobuf:"bytes,7,opt,name=HttpPort,proto3" json:"HttpPort,omitempty"`
	Region    string `protobuf:"bytes,8,opt,name=Region,proto3" json:"Region,omitempty"`
	VPNPort   string `protobuf:"bytes,9,opt,name=VPNPort,proto3" json:"VPNPort,omitempty"`
	// contains filtered or unexported fields
}

func (*Status) Descriptor deprecated

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

Deprecated: Use Status.ProtoReflect.Descriptor instead.

func (*Status) GetDomain

func (x *Status) GetDomain() string

func (*Status) GetGRPCPort

func (x *Status) GetGRPCPort() string

func (*Status) GetHostname

func (x *Status) GetHostname() string

func (*Status) GetHttpPort

func (x *Status) GetHttpPort() string

func (*Status) GetPrivateIP

func (x *Status) GetPrivateIP() string

func (*Status) GetPublicIP

func (x *Status) GetPublicIP() string

func (*Status) GetRegion

func (x *Status) GetRegion() string

func (*Status) GetVPNPort

func (x *Status) GetVPNPort() string

func (*Status) GetVersion

func (x *Status) GetVersion() string

func (*Status) ProtoMessage

func (*Status) ProtoMessage()

func (*Status) ProtoReflect

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

func (*Status) Reset

func (x *Status) Reset()

func (*Status) String

func (x *Status) String() string

type WireGuardServer

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

WireGuardServer supports both Kernel and Userland implementations of WireGuard.

func NewServer

func NewServer(wg *wgctrl.Client, deviceName string) (*WireGuardServer, error)

NewServer initializes a Server with a WireGuard client.

Jump to

Keyboard shortcuts

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