company

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: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Company

type Company interface {
	Fetch(id string) (*CompanyType, error)
	FetchByName(name string) (*CompanyType, error)
	FetchAll() ([]*CompanyType, error)
	Insert(ct *CompanyType) error
	Update(ct *CompanyType) error
	Delete(id string) error
}

Company for fetching data interface - implementation is in repository

type CompanyFieldResolver

type CompanyFieldResolver interface {
	GetByID(p graphql.ResolveParams) (interface{}, error)
	List(p graphql.ResolveParams) (interface{}, error)
	Create(p graphql.ResolveParams) (interface{}, error)
	Update(p graphql.ResolveParams) (interface{}, error)
	Delete(p graphql.ResolveParams) (interface{}, error)
}

CompanyFieldResolver for resolver of schema interface

func NewCompanyFieldResolve

func NewCompanyFieldResolve(
	logger *zap.Logger,
	companyRepo Company,
) CompanyFieldResolver

NewCompanyFieldResolve returns CompanyFieldResolver interface

type CompanyType

type CompanyType struct {
	ID      int    `json:"id" boil:"id"`
	Name    string `json:"name" boil:"name"`
	Country string `json:"country" boil:"country"`
}

CompanyType is type of company

Jump to

Keyboard shortcuts

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