model

package
v0.5.8 Latest Latest
Warning

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

Go to latest
Published: Dec 27, 2019 License: Apache-2.0 Imports: 5 Imported by: 55

Documentation

Index

Constants

This section is empty.

Variables

View Source
var CoreFileTmpl = `` /* 426-byte string literal not displayed */

Functions

This section is empty.

Types

type CoreFile added in v0.5.2

type CoreFile struct {
	CoreDNSDBFile  string
	CoreDNSDBZone  string
	Domain         string
	EtcdPrefixPath string
	EtcdEndpoints  string
	TTL            string
	WildCardBound  string
}

type Domain

type Domain struct {
	Fqdn       string              `json:"fqdn,omitempty"`
	Hosts      []string            `json:"hosts,omitempty"`
	SubDomain  map[string][]string `json:"subdomain,omitempty"`
	Text       string              `json:"text,omitempty"`
	CNAME      string              `json:"cname,omitempty"`
	Expiration *time.Time          `json:"expiration,omitempty"`
}

func (*Domain) String

func (d *Domain) String() string

type DomainOptions

type DomainOptions struct {
	Fqdn      string              `json:"fqdn"`
	Hosts     []string            `json:"hosts"`
	SubDomain map[string][]string `json:"subdomain"`
	Text      string              `json:"text"`
	CNAME     string              `json:"cname"`
	Normal    bool                `json:"normal"`
}

func ParseDomainOptions

func ParseDomainOptions(r *http.Request) (*DomainOptions, error)

func (*DomainOptions) String

func (d *DomainOptions) String() string

type FrozenPrefix added in v0.5.0

type FrozenPrefix struct {
	ID        int64  `db:"id"`
	Prefix    string `db:"prefix"`
	CreatedOn int64  `db:"created_on"`
}

type MigrateFrozen added in v0.5.0

type MigrateFrozen struct {
	Path       string     `json:"path"`
	Expiration *time.Time `json:"expiration"`
}

func ParseMigrateFrozen added in v0.5.0

func ParseMigrateFrozen(r *http.Request) (*MigrateFrozen, error)

type MigrateRecord added in v0.5.0

type MigrateRecord struct {
	Fqdn       string              `json:"fqdn"`
	Hosts      []string            `json:"hosts"`
	SubDomain  map[string][]string `json:"subdomain"`
	Text       string              `json:"text"`
	Token      string              `json:"token"`
	Expiration *time.Time          `json:"expiration"`
}

func ParseMigrateRecord added in v0.5.0

func ParseMigrateRecord(r *http.Request) (*MigrateRecord, error)

type MigrateToken added in v0.5.0

type MigrateToken struct {
	Path       string     `json:"path"`
	Token      string     `json:"token"`
	Expiration *time.Time `json:"expiration"`
}

func ParseMigrateToken added in v0.5.0

func ParseMigrateToken(r *http.Request) (*MigrateToken, error)

type RecordA added in v0.5.0

type RecordA struct {
	ID        int64         `db:"id"`
	Fqdn      string        `db:"fqdn"`
	Type      int           `db:"type"`
	Content   string        `db:"content"`
	CreatedOn int64         `db:"created_on"`
	UpdatedOn sql.NullInt64 `db:"updated_on"`
	TID       int64         `db:"tid"`
}

type RecordCNAME added in v0.5.6

type RecordCNAME struct {
	ID        int64         `db:"id"`
	Fqdn      string        `db:"fqdn"`
	Type      int           `db:"type"`
	Content   string        `db:"content"`
	CreatedOn int64         `db:"created_on"`
	UpdatedOn sql.NullInt64 `db:"updated_on"`
	TID       int64         `db:"tid"`
}

type RecordTXT added in v0.5.0

type RecordTXT struct {
	ID        int64         `db:"id"`
	Fqdn      string        `db:"fqdn"`
	Type      int           `db:"type"`
	Content   string        `db:"content"`
	CreatedOn int64         `db:"created_on"`
	UpdatedOn sql.NullInt64 `db:"updated_on"`
	TID       int64         `db:"tid"`
}

type Response

type Response struct {
	Status  int    `json:"status"`
	Message string `json:"msg"`
	Data    Domain `json:"data,omitempty"`
	Token   string `json:"token"`
}

type SubRecordA added in v0.5.0

type SubRecordA struct {
	ID        int64         `db:"id"`
	Fqdn      string        `db:"fqdn"`
	Type      int           `db:"type"`
	Content   string        `db:"content"`
	CreatedOn int64         `db:"created_on"`
	UpdatedOn sql.NullInt64 `db:"updated_on"`
	PID       int64         `db:"pid"`
}

type Token added in v0.5.0

type Token struct {
	ID        int64  `db:"id"`
	Token     string `db:"token"`
	Fqdn      string `db:"fqdn"`
	CreatedOn int64  `db:"created_on"`
}

Jump to

Keyboard shortcuts

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