service

package
v0.0.0-...-022324c Latest Latest
Warning

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

Go to latest
Published: Feb 1, 2024 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ProviderSet = wire.NewSet(
	NewService,
)

Functions

func NewService

func NewService(repo GeoRepo,
	c *conf.Config,
	log klog.CtxLogger) geo.Service

Types

type GeoRepo

type GeoRepo interface {
	Get(ctx context.Context, ip string, region geo.Region) (*geo.GeoObject, error)
}

type RequestArgument

type RequestArgument interface {
	IsValid() error
}

type Service

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

func (*Service) CheckArgument

func (s *Service) CheckArgument(argument RequestArgument) error

func (*Service) Get

func (s *Service) Get(ctx context.Context,
	info *geo.GetRequest) (*geo.GeoObject, error)

func (*Service) GetWithIP

func (s *Service) GetWithIP(ctx context.Context,
	info *geo.GetWithIPRequest) (*geo.GeoObject, error)

Jump to

Keyboard shortcuts

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