db

package
v0.0.0-...-2610577 Latest Latest
Warning

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

Go to latest
Published: Oct 19, 2020 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type DB

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

DB provides database access to operations.

func New

func New(sqldb *sql.DB) *DB

New returns new DB.

func (*DB) Create

func (db *DB) Create(ctx context.Context, userID string, operation *longrunning.Operation) error

Create adds operation to the database.

func (*DB) Get

func (db *DB) Get(ctx context.Context, id string, userID string) (*longrunning.Operation, error)

Get returns operation by id.

func (*DB) Update

func (db *DB) Update(ctx context.Context, userID string, operation *longrunning.Operation) error

Update updates operation in the database.

Jump to

Keyboard shortcuts

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