ipinfo

package
v0.28.0 Latest Latest
Warning

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

Go to latest
Published: Nov 14, 2024 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Client

type Client struct {
	// contains filtered or unexported fields
}

func NewClient

func NewClient(ctx context.Context, config cfg.Config, logger log.Logger) (*Client, error)

func ProvideClient

func ProvideClient(ctx context.Context, config cfg.Config, logger log.Logger) (*Client, error)

func (*Client) GetIpInfo

func (c *Client) GetIpInfo(ctx context.Context) (*IpInfo, error)

type IpInfo

type IpInfo struct {
	Ip       string `json:"ip"`
	Hostname string `json:"hostname"`
	City     string `json:"city"`
	Region   string `json:"region"`
	Country  string `json:"country"`
	Loc      string `json:"loc"`
	Org      string `json:"org"`
	Postal   string `json:"postal"`
	Timezone string `json:"timezone"`
	Readme   string `json:"readme"`
}

func ProvideIpInfo

func ProvideIpInfo(ctx context.Context, config cfg.Config, logger log.Logger) (*IpInfo, error)

Jump to

Keyboard shortcuts

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