postgres

package
v0.0.0-...-c460348 Latest Latest
Warning

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

Go to latest
Published: Oct 18, 2018 License: MIT Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Ports

type Ports []api.Port

func (*Ports) Scan

func (s *Ports) Scan(src interface{}) error

func (Ports) Value

func (s Ports) Value() (driver.Value, error)

type Store

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

func New

func New(db *sqlx.DB) *Store

func (*Store) AddEndpoints

func (s *Store) AddEndpoints(node api.Node) (modification *api.Modification, err error)

func (*Store) GetEndpoints

func (s *Store) GetEndpoints(currentIndex int64) (nodes []api.Node, index int64, useCache bool, err error)

func (*Store) GetServices

func (s *Store) GetServices(currentIndex int64) (services []api.Service, index int64, useCache bool, err error)

func (*Store) RemoveEndpoints

func (s *Store) RemoveEndpoints(nodeID string, serviceNames ...string) (modification *api.Modification, err error)

func (*Store) RemoveService

func (s *Store) RemoveService(serviceName string) (index int64, err error)

func (*Store) SetService

func (s *Store) SetService(service api.Service) (index int64, err error)

type StringSlice

type StringSlice []string

func (*StringSlice) Scan

func (s *StringSlice) Scan(src interface{}) error

Implements sql.Scanner for the String slice type Scanners take the database value (in this case as a byte slice) and sets the value of the type. Here we cast to a string and do a regexp based parse

func (StringSlice) Value

func (s StringSlice) Value() (driver.Value, error)

Jump to

Keyboard shortcuts

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