domain

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Oct 3, 2024 License: GPL-3.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AppConfig added in v0.0.5

type AppConfig struct {
	HttpPort              int
	GrpcPort              int
	GrpcUseReflection     bool
	DatabaseUrl           string
	GrpcReadTimeout       int
	HttpReadTimeout       int
	HttpReadHeaderTimeout int
	HttpWriteTimeout      int
	IsRandomIpRequest     bool
	Version               string
}

func (*AppConfig) Validate added in v0.0.5

func (c *AppConfig) Validate() error

type DatabaseConfig

type DatabaseConfig struct {
	LastUpdate  time.Time `json:"last_update" db:"last_update"`
	ActiveTable string    `json:"active_table" db:"active_table"`
	BackupTable string    `json:"backup_table" db:"backup_table"`
}

type IpInfo

type IpInfo struct {
	Ip        net.IP  `json:"ip"`
	Continent string  `json:"continent" db:"continent"`
	Country   string  `json:"country" db:"country"`
	StateProv string  `json:"state_prov" db:"state_prov"`
	City      string  `json:"city" db:"city"`
	Latitude  float64 `json:"latitude" db:"latitude"`
	Longitude float64 `json:"longitude" db:"longitude"`
}

func (*IpInfo) String

func (i *IpInfo) String() string

type Response

type Response struct {
	Err     string      `json:"error"`
	Content interface{} `json:"content"`
}

func NewResponse

func NewResponse(err error, content interface{}) *Response

func (*Response) Bytes

func (r *Response) Bytes() []byte

Jump to

Keyboard shortcuts

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