app

package
v0.0.0-...-5063de3 Latest Latest
Warning

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

Go to latest
Published: Sep 10, 2023 License: BSD-3-Clause Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var Provides = wire.NewSet(
	wire.Struct(new(App), "*"),
)

Functions

This section is empty.

Types

type App

type App struct {
	Values *common.Values
}

func (*App) FetchIp

func (x *App) FetchIp() (ip string, err error)

FetchIp 用于返回真实客户端 IP 使用 https://hub.docker.com/r/traefik/whoami

func (*App) RecordModify

func (x *App) RecordModify(value string) (err error)

RecordModify 修改记录值

func (*App) Run

func (x *App) Run() (ticker *time.Ticker, err error)

func (*App) SetRecord

func (x *App) SetRecord() (err error)

SetRecord 获取域名记录信息并暂存状态

func (*App) Watch

func (x *App) Watch() (err error)

type IpDto

type IpDto struct {
	Headers struct {
		Ip []string `json:"X-Real-Ip"`
	} `json:"headers"`
}

type RecordDto

type RecordDto struct {
	Id    string `json:"id"`
	Value string `json:"value"`
}

type RecordListDto

type RecordListDto struct {
	Status  StatusDto   `json:"status"`
	Records []RecordDto `json:"records"`
}

type RecordModifyDto

type RecordModifyDto struct {
	Status StatusDto `json:"status"`
}

type StatusDto

type StatusDto struct {
	Code string `json:"code"`
}

Jump to

Keyboard shortcuts

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