router

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Jan 26, 2021 License: MIT Imports: 14 Imported by: 0

Documentation

Index

Constants

View Source
const (
	SUCCESS int32 = 0
	ERROR   int32 = 1
)

Variables

This section is empty.

Functions

This section is empty.

Types

type DnsDomainEntity

type DnsDomainEntity struct {
	Name       string
	CreateTime string
	Status     string
	Enabled    bool
	Remark     string
}

type DnsDomainRequest

type DnsDomainRequest struct {
	Name   string `json:"name"`
	Remark string `json:"remark,omitempty"`
}

type DnsDomainSort

type DnsDomainSort []*DnsDomainEntity

func (DnsDomainSort) Len

func (ds DnsDomainSort) Len() int

func (DnsDomainSort) Less

func (ds DnsDomainSort) Less(i, j int) bool

func (DnsDomainSort) Swap

func (ds DnsDomainSort) Swap(i, j int)

type DnsRuleEntity

type DnsRuleEntity struct {
	Name       string
	Zone       string
	Host       string
	Type       string
	Data       string
	Ttl        int32
	MxPriority int32
	CreateTime string
	Enabled    bool
}

type DnsRuleRequest

type DnsRuleRequest struct {
	Name       string `json:"name"`
	Zone       string `json:"zone"`
	Host       string `json:"host"`
	Type       string `json:"type"`
	Data       string `json:"data"`
	Ttl        int32  `json:"ttl"`
	MxPriority int32  `json:"mxPriority"`
}

type DnsRuleSort

type DnsRuleSort []*DnsRuleEntity

func (DnsRuleSort) Len

func (rs DnsRuleSort) Len() int

func (DnsRuleSort) Less

func (rs DnsRuleSort) Less(i, j int) bool

func (DnsRuleSort) Swap

func (rs DnsRuleSort) Swap(i, j int)

type HttpServer

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

func NewHttpServer

func NewHttpServer(port string) (server *HttpServer)

func (*HttpServer) Start

func (server *HttpServer) Start()

Start used to start the api http server.

func (*HttpServer) Stop

func (server *HttpServer) Stop()

Stop used to stop the http server.

type Response

type Response struct {
	Code int32       `json:"code"`
	Msg  string      `json:"msg"`
	Data interface{} `json:"data"`
}

Jump to

Keyboard shortcuts

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