ddns

package
v0.0.0-...-176b7a0 Latest Latest
Warning

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

Go to latest
Published: Jun 21, 2019 License: MIT Imports: 10 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func LogErr

func LogErr(format string, v ...interface{})

func LogInfo

func LogInfo(format string, v ...interface{})

func LogWarn

func LogWarn(format string, v ...interface{})

func Main

func Main()

Types

type AddDomainForm

type AddDomainForm struct {
	Domain string `json:"domain"`
	IP     string `json:"ip"`
}

type Api

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

func NewApi

func NewApi(cfg *ApiConfig, s *Store) *Api

func (*Api) Run

func (a *Api) Run()

func (*Api) Stop

func (a *Api) Stop()

type ApiConfig

type ApiConfig struct {
	Addr  string `json:"addr" toml:"addr"`
	Token string `json:"token" toml:"token"`
}

type Config

type Config struct {
	DDNSConfig  *DDNSConfig  `json:"ddns" toml:"ddns"`
	StoreConfig *StoreConfig `json:"store" toml:"store"`
	ApiConfig   *ApiConfig   `json:"api" toml:"api"`
}

func ParseConfig

func ParseConfig(path string) (*Config, error)

func (*Config) String

func (c *Config) String() string

type DDNS

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

func NewDDNS

func NewDDNS(cfg *DDNSConfig, s *Store) (*DDNS, error)

func (*DDNS) Run

func (d *DDNS) Run()

func (*DDNS) Stop

func (d *DDNS) Stop()

type DDNSConfig

type DDNSConfig struct {
	Addr string `json:"ddns_server" toml:"addr"`
}

type Store

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

func NewStore

func NewStore(cfg *StoreConfig) (*Store, error)

func (*Store) Close

func (s *Store) Close()

func (*Store) Get

func (s *Store) Get(key string) (interface{}, error)

func (*Store) Set

func (s *Store) Set(key string, value string) error

type StoreConfig

type StoreConfig struct {
	Path   string `json:"path" toml:"path"`
	Bucket string `json:"bucket" toml:"bucket"`
}

Jump to

Keyboard shortcuts

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