country

package
v0.0.0-...-3f0a6de Latest Latest
Warning

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

Go to latest
Published: May 14, 2021 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Country

type Country interface {
	Fetch(id string) (*CountryType, error)
	FetchByName(name string) (*CountryType, error)
	FetchAll() ([]*CountryType, error)
}

Country for fetching data interface - implementation is in repository

type CountryFieldResolver

type CountryFieldResolver interface {
	GetByID(p graphql.ResolveParams) (interface{}, error)
	List(p graphql.ResolveParams) (interface{}, error)
}

CountryFieldResolver for resolver of schema interface

func NewCountryFieldResolve

func NewCountryFieldResolve(
	logger *zap.Logger,
	countryRepo Country,
) CountryFieldResolver

NewCountryFieldResolve returns CountryFieldResolver interface

type CountryType

type CountryType struct {
	ID   int    `json:"id" boil:"id"`
	Code string `json:"country_code" boil:"country_code"`
	Name string `json:"name" boil:"name"`
}

CountryType is type of country

Jump to

Keyboard shortcuts

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