models

package
v1.1.1 Latest Latest
Warning

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

Go to latest
Published: Nov 30, 2023 License: GPL-3.0 Imports: 0 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	UserLogin    string
	UserSecret   string
	WApiUsername string
	WApiPassword string
	BaseUrl      string
	UseLogFile   bool
	JsonWebKey   string
}

type Login

type Login struct {
	Login  string `json:"login"`
	Secret string `json:"secret"`
}

type Record

type Record struct {
	RecordID  string `json:"ID,omitempty"`
	Subdomain string `json:"name,omitempty"`
	TTL       string `json:"ttl,omitempty"`
	Type      string `json:"rdtype,omitempty"`
	IP        string `json:"rdata,omitempty"`
	UpdatedAt string `json:"changed_date,omitempty"`
	Comment   string `json:"author_comment,omitempty"`
}

type Request

type Request struct {
	Body RequestBody `json:"request"`
}

type RequestBody

type RequestBody struct {
	Login   string      `json:"user"`
	Secret  string      `json:"auth"`
	Command string      `json:"command"`
	Data    RequestData `json:"data"`
}

type RequestData

type RequestData struct {
	Domain    string `json:"domain"`
	Subdomain string `json:"name,omitempty"`
	TTL       int    `json:"ttl,omitempty"`
	Type      string `json:"type,omitempty"`
	RowID     int    `json:"row_id,omitempty"`
	IP        string `json:"rdata,omitempty"`
}

type ResponseBody

type ResponseBody struct {
	StatusCode   int         `json:"code"`
	ResultStatus string      `json:"result"`
	Timestamp    int64       `json:"timestamp,omitempty"`
	RequestID    string      `json:"svTRID,omitempty"`
	Command      string      `json:"command,omitempty"`
	Data         ResponseRow `json:"data,omitempty"`
}

type ResponseRow

type ResponseRow struct {
	Records []Record `json:"row,omitempty"`
}

type TokenResponse added in v1.0.0

type TokenResponse struct {
	Token string `json:"token"`
}

type User added in v1.0.0

type User struct {
	Id       int
	Login    string
	Password string
	IsActive bool
}

type WApiResponse

type WApiResponse struct {
	Body ResponseBody `json:"response"`
}

Jump to

Keyboard shortcuts

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