model

package
v0.2.5 Latest Latest
Warning

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

Go to latest
Published: Oct 8, 2024 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AuthRequest

type AuthRequest struct {
	Password string `json:"password"`
}

type AuthResponse

type AuthResponse struct {
	Session struct {
		Valid    bool   `json:"valid"`
		Totp     bool   `json:"totp"`
		Sid      string `json:"sid"`
		Csrf     string `json:"csrf"`
		Validity int    `json:"validity"`
		Message  string `json:"message"`
	} `json:"session"`
}

type ConfigResponse

type ConfigResponse struct {
	Config map[string]interface{} `json:"config"`
}

type PatchConfig

type PatchConfig struct {
	DNS      map[string]interface{} `json:"dns"`
	DHCP     map[string]interface{} `json:"dhcp"`
	NTP      map[string]interface{} `json:"ntp"`
	Resolver map[string]interface{} `json:"resolver"`
	Database map[string]interface{} `json:"database"`
	Misc     map[string]interface{} `json:"misc"`
	Debug    map[string]interface{} `json:"debug"`
}

type PatchConfigRequest

type PatchConfigRequest struct {
	Config PatchConfig `json:"config"`
}

type PiHole

type PiHole struct {
	Url      *url.URL
	Password string
}

func NewPiHole

func NewPiHole(host, password string) PiHole

func (*PiHole) Decode

func (piHole *PiHole) Decode(value string) error

type PostGravityRequest

type PostGravityRequest struct {
	Group             bool `json:"group"`
	Adlist            bool `json:"adlist"`
	AdlistByGroup     bool `json:"adlist_by_group"`
	Domainlist        bool `json:"domainlist"`
	DomainlistByGroup bool `json:"domainlist_by_group"`
	Client            bool `json:"client"`
	ClientByGroup     bool `json:"client_by_group"`
}

type PostTeleporterRequest

type PostTeleporterRequest struct {
	Config     bool               `json:"config"`
	DHCPLeases bool               `json:"dhcp_leases"`
	Gravity    PostGravityRequest `json:"gravity"`
}

type VersionResponse

type VersionResponse struct {
	Version struct {
		Core struct {
			Local struct {
				Version string `json:"version"`
				Branch  string `json:"branch"`
				Hash    string `json:"hash"`
			} `json:"local"`
			Remote struct {
				Version interface{} `json:"version"`
				Hash    string      `json:"hash"`
			} `json:"remote"`
		} `json:"core"`
		Web struct {
			Local struct {
				Version string `json:"version"`
				Branch  string `json:"branch"`
				Hash    string `json:"hash"`
			} `json:"local"`
			Remote struct {
				Version interface{} `json:"version"`
				Hash    string      `json:"hash"`
			} `json:"remote"`
		} `json:"web"`
		Ftl struct {
			Local struct {
				Hash    string `json:"hash"`
				Branch  string `json:"branch"`
				Version string `json:"version"`
				Date    string `json:"date"`
			} `json:"local"`
			Remote struct {
				Version interface{} `json:"version"`
				Hash    string      `json:"hash"`
			} `json:"remote"`
		} `json:"ftl"`
		Docker struct {
			Local  string `json:"local"`
			Remote string `json:"remote"`
		} `json:"docker"`
	} `json:"version"`
	Took float64 `json:"took"`
}

Jump to

Keyboard shortcuts

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