leaseiface

package
v0.32.1 Latest Latest
Warning

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

Go to latest
Published: Oct 9, 2020 License: Apache-2.0 Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Servicer

type Servicer interface {
	// Get returns an lease from ID
	Get(ID string) (*lease.Lease, error)

	// GetByAccountIDAndPrincipalID gets the Lease record by AccountID and PrincipalID
	GetByAccountIDAndPrincipalID(accountID string, principalID string) (*lease.Lease, error)

	// Save writes the record to the dataSvc
	Create(data *lease.Lease, principalSpentAmount float64) (*lease.Lease, error)

	// Update the Lease record to status Inactive in DynamoDB
	Delete(ID string) (*lease.Lease, error)

	// List Get a list of lease based on Lease ID
	List(query *lease.Lease) (*lease.Leases, error)

	// ListPages runs a function on each page in a list
	ListPages(query *lease.Lease, fn func(*lease.Leases) bool) error
}

Servicer makes working with the Lease Service struct easier

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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