node

package
v0.0.0-...-df9dd71 Latest Latest
Warning

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

Go to latest
Published: Jun 7, 2024 License: MPL-2.0 Imports: 31 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func EncodePrivate

func EncodePrivate(privKey *ecdsa.PrivateKey) (string, error)

Types

type Controller

type Controller struct {
	*conf.Options
	// contains filtered or unexported fields
}

func NewController

func NewController(server vCore.Core, api *panel.Client, config *conf.Options) *Controller

NewController return a Node controller with default parameters.

func (*Controller) Close

func (c *Controller) Close() error

Close implement the Close() function of the service interface

func (*Controller) SpeedChecker

func (c *Controller) SpeedChecker() error

func (*Controller) Start

func (c *Controller) Start() error

Start implement the Start() function of the service interface

type Lego

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

func NewLego

func NewLego(config *conf.CertConfig) (*Lego, error)

func (*Lego) CheckCert

func (l *Lego) CheckCert(file []byte) (bool, error)

func (*Lego) CreateCert

func (l *Lego) CreateCert() (err error)

func (*Lego) RenewCert

func (l *Lego) RenewCert() error

func (*Lego) SetProvider

func (l *Lego) SetProvider() error

type Node

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

func New

func New() *Node

func (*Node) Close

func (n *Node) Close()

func (*Node) Start

func (n *Node) Start(nodes []conf.NodeConfig, core vCore.Core) error

type User

type User struct {
	Email        string                 `json:"Email"`
	Registration *registration.Resource `json:"Registration"`

	KeyEncoded string `json:"Key"`
	// contains filtered or unexported fields
}

func NewLegoUser

func NewLegoUser(path string, email string) (*User, error)

func (*User) DecodePrivate

func (u *User) DecodePrivate(pemEncodedPriv string) (*ecdsa.PrivateKey, error)

func (*User) GetEmail

func (u *User) GetEmail() string

func (*User) GetPrivateKey

func (u *User) GetPrivateKey() crypto.PrivateKey

func (*User) GetRegistration

func (u *User) GetRegistration() *registration.Resource

func (*User) Load

func (u *User) Load(path string) error

func (*User) Save

func (u *User) Save(path string) error

Jump to

Keyboard shortcuts

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