storer

package
v0.0.0-...-9f01b0d Latest Latest
Warning

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

Go to latest
Published: Feb 12, 2023 License: GPL-2.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type GRPCStorer

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

func NewGRPCStorer

func NewGRPCStorer(client pb.PortdomainClient) *GRPCStorer

func (*GRPCStorer) List

func (g *GRPCStorer) List(ctx context.Context) ([]*pb.Port, error)

func (*GRPCStorer) Store

func (g *GRPCStorer) Store(ctx context.Context, port *pb.Port) error

type PostgresStorer

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

Storage implements the ports.Storer interface

func NewPostgresStorer

func NewPostgresStorer(db *sql.DB) *PostgresStorer

NewPostgresStorer returns initialized *Storage

func (*PostgresStorer) List

func (s *PostgresStorer) List(ctx context.Context) ([]*pb.Port, error)

func (*PostgresStorer) Store

func (s *PostgresStorer) Store(ctx context.Context, in *pb.Port) error

Jump to

Keyboard shortcuts

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