Documentation ¶
Index ¶
- Variables
- func DeleteCollection(ctx context.Context, postcode string, council string, suburb string) error
- func DeleteDisposalMethod(ctx context.Context, collectionID string, name string) error
- func DeleteMaterial(ctx context.Context, name string, disposalmethodID string) error
- func DeleteProduct(ctx context.Context, barcode string) error
- func Initialize(ctx context.Context, profile string, region string, tableName string) error
- type Collection
- type Component
- type DisposalMethod
- type Material
- type Product
Constants ¶
This section is empty.
Variables ¶
View Source
var ( DynamoDBClient *dynamodb.Client TableName string )
Functions ¶
func DeleteCollection ¶
DeleteCollection deletes an existing collection.
func DeleteDisposalMethod ¶
DeleteDisposalMethod deletes an existing disposal method.
func DeleteMaterial ¶
DeleteMaterial deletes an existing material.
func DeleteProduct ¶
DeleteProduct deletes an existing product.
Types ¶
type Collection ¶
type Collection struct { Postcode string `json:"postcode" dynamodbav:"postcode"` Council string `json:"council" dynamodbav:"council"` Suburb string `json:"suburb" dynamodbav:"suburb"` State string `json:"state" dynamodbav:"state"` Description string `json:"description" dynamodbav:"description"` CreatedAt time.Time `json:"createdAt" dynamodbav:"createdAt"` UpdatedAt time.Time `json:"updatedAt" dynamodbav:"updatedAt"` }
func GetCollection ¶
func GetCollection(ctx context.Context, postcode string, council string, suburb string) (*Collection, error)
GetCollection fetches an existing collection.
func GetCollections ¶ added in v0.2.0
func GetCollections(ctx context.Context, postcode string) ([]*Collection, error)
GetCollections fetches all the collections under the postcode parameter.
type DisposalMethod ¶
type DisposalMethod struct { CollectionID string `json:"collectionId" dynamodbav:"collectionId"` Name string `json:"name" dynamodbav:"name"` Description string `json:"description" dynamodbav:"description"` CreatedAt time.Time `json:"createdAt" dynamodbav:"createdAt"` UpdatedAt time.Time `json:"updatedAt" dynamodbav:"updatedAt"` }
func GetDisposalMethod ¶
func GetDisposalMethod(ctx context.Context, collectionID string, name string) (*DisposalMethod, error)
GetDisposalMethod fetches an existing disposal method.
type Material ¶
type Material struct { Name string `json:"name" dynamodbav:"name"` DisposalMethodID string `json:"disposalMethodId" dynamodbav:"disposalMethodId"` Description string `json:"description" dynamodbav:"description"` CreatedAt time.Time `json:"createdAt" dynamodbav:"createdAt"` UpdatedAt time.Time `json:"updatedAt" dynamodbav:"updatedAt"` }
func GetMaterial ¶
GetMaterial fetches an existing material.
type Product ¶
type Product struct { Barcode string `json:"barcode" dynamodbav:"barcode"` BrandName string `json:"brandName" dynamodbav:"brandName"` ProductName string `json:"productName" dynamodbav:"productName"` Components []*Component `json:"components" dynamodbav:"components"` CreatedAt time.Time `json:"createdAt" dynamodbav:"createdAt"` UpdatedAt time.Time `json:"updatedAt" dynamodbav:"updatedAt"` }
func GetProduct ¶
GetProduct fetches an existing product.
Click to show internal directories.
Click to hide internal directories.