postgres

package
v0.0.0-...-cb2c959 Latest Latest
Warning

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

Go to latest
Published: Nov 17, 2018 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func New

func New(db *sql.DB) alliance.Service

New creates a new alliance service.

Types

type Service

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

Service is used for getting information about an alliance from a postgres database.

func (*Service) Get

func (s *Service) Get(matchKey string, isBlue bool) (alliance.Alliance, error)

Get gets a certain alliance given a matchKey and whether they were blue or red.

func (*Service) GetColor

func (s *Service) GetColor(matchKey string, number string) (isBlue bool, err error)

GetColor retrieves the color of the alliance given a matchKey and number.

func (*Service) Upsert

func (s *Service) Upsert(matchKey string, isBlue bool, alliance alliance.Alliance) error

Upsert upserts a whole alliance in the postgres database.

Jump to

Keyboard shortcuts

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