data

package
v0.37.1 Latest Latest
Warning

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

Go to latest
Published: Mar 11, 2024 License: Apache-2.0 Imports: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Account

type Account struct {
	DynamoDB       dynamodbiface.DynamoDBAPI
	TableName      string `env:"ACCOUNT_DB"`
	ConsistentRead bool   `env:"USE_CONSISTENT_READS" envDefault:"false"`
	Limit          int64  `env:"LIMIT" envDefault:"25"`
}

Account - Data Layer Struct

func (*Account) Delete

func (a *Account) Delete(account *account.Account) error

Delete the Account record in DynamoDB

func (*Account) Get

func (a *Account) Get(ID string) (*account.Account, error)

Get the Account record by ID

func (*Account) List

func (a *Account) List(query *account.Account) (*account.Accounts, error)

List Get a list of accounts

func (*Account) Write

func (a *Account) Write(account *account.Account, prevLastModifiedOn *int64) error

Write the Account record in DynamoDB This is an upsert operation in which the record will either be inserted or updated prevLastModifiedOn parameter is the original lastModifiedOn

type Lease

type Lease struct {
	DynamoDB       dynamodbiface.DynamoDBAPI
	TableName      string `env:"LEASE_DB"`
	ConsistentRead bool   `env:"USE_CONSISTENT_READS" envDefault:"false"`
	Limit          int64  `env:"LIMIT" envDefault:"25"`
}

Lease - Data Layer Struct

func (*Lease) Get

func (a *Lease) Get(leaseID string) (*lease.Lease, error)

GetByID gets the Lease record by ID

func (*Lease) GetByAccountIDAndPrincipalID

func (a *Lease) GetByAccountIDAndPrincipalID(accountID string, principalID string) (*lease.Lease, error)

GetByAccountIDAndPrincipalID gets the Lease record by AccountID and PrincipalID

func (*Lease) List

func (a *Lease) List(query *lease.Lease) (*lease.Leases, error)

List Get a list of leases

func (*Lease) Write

func (a *Lease) Write(lease *lease.Lease, prevLastModifiedOn *int64) error

Write the Lease record in DynamoDB This is an upsert operation in which the record will either be inserted or updated prevLastModifiedOn parameter is the original lastModifiedOn

type Usage

type Usage struct {
	DynamoDB       dynamodbiface.DynamoDBAPI
	TableName      string `env:"USAGE_DB"`
	ConsistentRead bool   `env:"USE_CONSISTENT_READS" envDefault:"false"`
	Limit          int64  `env:"LIMIT" envDefault:"25"`
}

Usage - Data Layer Struct

func (*Usage) GetByStartDateAndPrincipalID

func (a *Usage) GetByStartDateAndPrincipalID(startDate int64, principalID string) (*usage.Usage, error)

GetByStartDateAndPrincipalID gets the Usage record by StartDate and PrincipalID

func (*Usage) List

func (a *Usage) List(query *usage.Usage) (*usage.Usages, error)

List Get a list of usage information

func (*Usage) Write

func (a *Usage) Write(usg *usage.Usage) error

Write the Lease record in DynamoDB This is an upsert operation in which the record will either be inserted or updated prevLastModifiedOn parameter is the original lastModifiedOn

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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