g

package
v0.0.0-...-05c5502 Latest Latest
Warning

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

Go to latest
Published: Jul 9, 2016 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

View Source
const (
	VERSION = "0.0.1"
)

changelog: 0.0.1

Variables

View Source
var RedisConnPool *redis.Pool

Functions

func InitRedisConnPool

func InitRedisConnPool()

func ParseConfig

func ParseConfig(cfg string) error

func PingRedis

func PingRedis(c redis.Conn, t time.Time) error

Types

type DomainConfig

type DomainConfig struct {
	DomainName  string   `json:"domain_name"`
	RecordNames []string `json:"record_names"`
}

type DomainListResult

type DomainListResult struct {
	Domains []DomainResult `json:"domains"`
}

type DomainResult

type DomainResult struct {
	Id      int    `json:"id"`
	Name    string `json:"name"`
	Records string `json:"records"`
	Status  string `json:"status"`
	Created myTime `json:"created_on"`
	Updated myTime `json:"updated_on"`
}

type GlobalConfig

type GlobalConfig struct {
	LogLevel       string         `json:"log_level"`
	Interval       int            `json:"interval"`
	LoginEmail     string         `json:"login_email"`
	LoginPassword  string         `json:"login_pwd"`
	GetIpApi       string         `json:"get_ip_api"`
	ExecuteCommand string         `json:"execute_command"`
	Domains        []DomainConfig `json:"domains"`
	Redis          RedisConfig    `json:"redis"`
}

func Config

func Config() *GlobalConfig

type RecordListResult

type RecordListResult struct {
	Domain  DomainResult   `json:"domain"`
	Records []RecordResult `json:"records"`
}

type RecordResult

type RecordResult struct {
	Id      string `json:"id"`
	Name    string `json:"name"`
	Type    string `json:"type"`
	Value   string `json:"value"`
	Status  string `json:"status"`
	Updated myTime `json:"updated_on"`
}

type RedisConfig

type RedisConfig struct {
	Enabled      bool   `json:"enabled"`
	Dsn          string `json:"dsn"`
	MaxIdle      int    `json:"maxIdle"`
	ConnTimeout  int    `json:"connTimeout"`
	ReadTimeout  int    `json:"readTimeout"`
	WriteTimeout int    `json:"writeTimeout"`
	Passwd       string `json:"passwd"`
}

type ServletResponse

type ServletResponse struct {
	Success bool   `json:"success"`
	Message string `json:"message"`
}

Jump to

Keyboard shortcuts

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