Documentation ¶
Index ¶
- type Config
- type DB
- func (d DB) CreateTables(ctx context.Context) error
- func (d DB) DeleteSimpleThing(ctx context.Context, name string) error
- func (d DB) DeleteTeacherSharingRule(ctx context.Context, teacher string, school string, app string) error
- func (d DB) DeleteThing(ctx context.Context, name string, version int64) error
- func (d DB) DeleteThingWithCompositeAttributes(ctx context.Context, name string, branch string, date strfmt.DateTime) error
- func (d DB) DeleteThingWithCompositeEnumAttributes(ctx context.Context, name string, branchID models.Branch, date strfmt.DateTime) error
- func (d DB) DeleteThingWithDateRange(ctx context.Context, name string, date strfmt.DateTime) error
- func (d DB) DeleteThingWithRequiredFields(ctx context.Context, name string) error
- func (d DB) DeleteThingWithUnderscores(ctx context.Context, iDApp string) error
- func (d DB) GetSimpleThing(ctx context.Context, name string) (*models.SimpleThing, error)
- func (d DB) GetTeacherSharingRule(ctx context.Context, teacher string, school string, app string) (*models.TeacherSharingRule, error)
- func (d DB) GetTeacherSharingRulesByDistrictAndSchoolTeacherApp(ctx context.Context, ...) ([]models.TeacherSharingRule, error)
- func (d DB) GetTeacherSharingRulesByTeacherAndSchoolApp(ctx context.Context, input db.GetTeacherSharingRulesByTeacherAndSchoolAppInput) ([]models.TeacherSharingRule, error)
- func (d DB) GetThing(ctx context.Context, name string, version int64) (*models.Thing, error)
- func (d DB) GetThingByID(ctx context.Context, id string) (*models.Thing, error)
- func (d DB) GetThingWithCompositeAttributes(ctx context.Context, name string, branch string, date strfmt.DateTime) (*models.ThingWithCompositeAttributes, error)
- func (d DB) GetThingWithCompositeAttributessByNameBranchAndDate(ctx context.Context, ...) ([]models.ThingWithCompositeAttributes, error)
- func (d DB) GetThingWithCompositeAttributessByNameVersionAndDate(ctx context.Context, ...) ([]models.ThingWithCompositeAttributes, error)
- func (d DB) GetThingWithCompositeEnumAttributes(ctx context.Context, name string, branchID models.Branch, date strfmt.DateTime) (*models.ThingWithCompositeEnumAttributes, error)
- func (d DB) GetThingWithCompositeEnumAttributessByNameBranchAndDate(ctx context.Context, ...) ([]models.ThingWithCompositeEnumAttributes, error)
- func (d DB) GetThingWithDateRange(ctx context.Context, name string, date strfmt.DateTime) (*models.ThingWithDateRange, error)
- func (d DB) GetThingWithDateRangesByNameAndDate(ctx context.Context, input db.GetThingWithDateRangesByNameAndDateInput) ([]models.ThingWithDateRange, error)
- func (d DB) GetThingWithRequiredFields(ctx context.Context, name string) (*models.ThingWithRequiredFields, error)
- func (d DB) GetThingWithUnderscores(ctx context.Context, iDApp string) (*models.ThingWithUnderscores, error)
- func (d DB) GetThingsByNameAndCreatedAt(ctx context.Context, input db.GetThingsByNameAndCreatedAtInput) ([]models.Thing, error)
- func (d DB) GetThingsByNameAndVersion(ctx context.Context, input db.GetThingsByNameAndVersionInput) ([]models.Thing, error)
- func (d DB) SaveSimpleThing(ctx context.Context, m models.SimpleThing) error
- func (d DB) SaveTeacherSharingRule(ctx context.Context, m models.TeacherSharingRule) error
- func (d DB) SaveThing(ctx context.Context, m models.Thing) error
- func (d DB) SaveThingWithCompositeAttributes(ctx context.Context, m models.ThingWithCompositeAttributes) error
- func (d DB) SaveThingWithCompositeEnumAttributes(ctx context.Context, m models.ThingWithCompositeEnumAttributes) error
- func (d DB) SaveThingWithDateRange(ctx context.Context, m models.ThingWithDateRange) error
- func (d DB) SaveThingWithRequiredFields(ctx context.Context, m models.ThingWithRequiredFields) error
- func (d DB) SaveThingWithUnderscores(ctx context.Context, m models.ThingWithUnderscores) error
- func (d DB) ScanThings(ctx context.Context, input db.ScanThingsInput, ...) error
- type SimpleThingTable
- type TeacherSharingRuleTable
- type ThingTable
- type ThingWithCompositeAttributesTable
- type ThingWithCompositeEnumAttributesTable
- type ThingWithDateRangeTable
- type ThingWithRequiredFieldsTable
- type ThingWithUnderscoresTable
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Config ¶
type Config struct { // DynamoDBAPI is used to communicate with DynamoDB. It is required. // It can be overriden on a table-by-table basis. DynamoDBAPI dynamodbiface.DynamoDBAPI // DefaultPrefix configures a prefix on all table names. It is required. // It can be overriden on a table-by-table basis. DefaultPrefix string // DefaultWriteCapacityUnits configures a default write capacity when creating tables. It defaults to 1. // It can be overriden on a table-by-table basis. DefaultWriteCapacityUnits int64 // DefaultReadCapacityUnits configures a default read capacity when creating tables. It defaults to 1. // It can be overriden on a table-by-table basis. DefaultReadCapacityUnits int64 // SimpleThingTable configuration. SimpleThingTable SimpleThingTable // TeacherSharingRuleTable configuration. TeacherSharingRuleTable TeacherSharingRuleTable // ThingTable configuration. ThingTable ThingTable // ThingWithCompositeAttributesTable configuration. ThingWithCompositeAttributesTable ThingWithCompositeAttributesTable // ThingWithCompositeEnumAttributesTable configuration. ThingWithCompositeEnumAttributesTable ThingWithCompositeEnumAttributesTable // ThingWithDateRangeTable configuration. ThingWithDateRangeTable ThingWithDateRangeTable // ThingWithRequiredFieldsTable configuration. ThingWithRequiredFieldsTable ThingWithRequiredFieldsTable // ThingWithUnderscoresTable configuration. ThingWithUnderscoresTable ThingWithUnderscoresTable }
Config is used to create a new DB struct.
type DB ¶
type DB struct {
// contains filtered or unexported fields
}
DB implements the database interface using DynamoDB to store data.
func (DB) CreateTables ¶
CreateTables creates all tables.
func (DB) DeleteSimpleThing ¶
DeleteSimpleThing deletes a SimpleThing from the database.
func (DB) DeleteTeacherSharingRule ¶ added in v1.12.0
func (d DB) DeleteTeacherSharingRule(ctx context.Context, teacher string, school string, app string) error
DeleteTeacherSharingRule deletes a TeacherSharingRule from the database.
func (DB) DeleteThing ¶
DeleteThing deletes a Thing from the database.
func (DB) DeleteThingWithCompositeAttributes ¶ added in v1.12.0
func (d DB) DeleteThingWithCompositeAttributes(ctx context.Context, name string, branch string, date strfmt.DateTime) error
DeleteThingWithCompositeAttributes deletes a ThingWithCompositeAttributes from the database.
func (DB) DeleteThingWithCompositeEnumAttributes ¶ added in v1.14.0
func (d DB) DeleteThingWithCompositeEnumAttributes(ctx context.Context, name string, branchID models.Branch, date strfmt.DateTime) error
DeleteThingWithCompositeEnumAttributes deletes a ThingWithCompositeEnumAttributes from the database.
func (DB) DeleteThingWithDateRange ¶
DeleteThingWithDateRange deletes a ThingWithDateRange from the database.
func (DB) DeleteThingWithRequiredFields ¶ added in v1.13.0
DeleteThingWithRequiredFields deletes a ThingWithRequiredFields from the database.
func (DB) DeleteThingWithUnderscores ¶ added in v1.7.1
DeleteThingWithUnderscores deletes a ThingWithUnderscores from the database.
func (DB) GetSimpleThing ¶
GetSimpleThing retrieves a SimpleThing from the database.
func (DB) GetTeacherSharingRule ¶ added in v1.12.0
func (d DB) GetTeacherSharingRule(ctx context.Context, teacher string, school string, app string) (*models.TeacherSharingRule, error)
GetTeacherSharingRule retrieves a TeacherSharingRule from the database.
func (DB) GetTeacherSharingRulesByDistrictAndSchoolTeacherApp ¶ added in v1.12.0
func (d DB) GetTeacherSharingRulesByDistrictAndSchoolTeacherApp(ctx context.Context, input db.GetTeacherSharingRulesByDistrictAndSchoolTeacherAppInput) ([]models.TeacherSharingRule, error)
GetTeacherSharingRulesByDistrictAndSchoolTeacherApp retrieves a list of TeacherSharingRules from the database.
func (DB) GetTeacherSharingRulesByTeacherAndSchoolApp ¶ added in v1.12.0
func (d DB) GetTeacherSharingRulesByTeacherAndSchoolApp(ctx context.Context, input db.GetTeacherSharingRulesByTeacherAndSchoolAppInput) ([]models.TeacherSharingRule, error)
GetTeacherSharingRulesByTeacherAndSchoolApp retrieves a list of TeacherSharingRules from the database.
func (DB) GetThingByID ¶ added in v1.8.0
GetThingByID retrieves a Thing from the database.
func (DB) GetThingWithCompositeAttributes ¶ added in v1.12.0
func (d DB) GetThingWithCompositeAttributes(ctx context.Context, name string, branch string, date strfmt.DateTime) (*models.ThingWithCompositeAttributes, error)
GetThingWithCompositeAttributes retrieves a ThingWithCompositeAttributes from the database.
func (DB) GetThingWithCompositeAttributessByNameBranchAndDate ¶ added in v1.12.0
func (d DB) GetThingWithCompositeAttributessByNameBranchAndDate(ctx context.Context, input db.GetThingWithCompositeAttributessByNameBranchAndDateInput) ([]models.ThingWithCompositeAttributes, error)
GetThingWithCompositeAttributessByNameBranchAndDate retrieves a list of ThingWithCompositeAttributess from the database.
func (DB) GetThingWithCompositeAttributessByNameVersionAndDate ¶ added in v1.12.0
func (d DB) GetThingWithCompositeAttributessByNameVersionAndDate(ctx context.Context, input db.GetThingWithCompositeAttributessByNameVersionAndDateInput) ([]models.ThingWithCompositeAttributes, error)
GetThingWithCompositeAttributessByNameVersionAndDate retrieves a list of ThingWithCompositeAttributess from the database.
func (DB) GetThingWithCompositeEnumAttributes ¶ added in v1.14.0
func (d DB) GetThingWithCompositeEnumAttributes(ctx context.Context, name string, branchID models.Branch, date strfmt.DateTime) (*models.ThingWithCompositeEnumAttributes, error)
GetThingWithCompositeEnumAttributes retrieves a ThingWithCompositeEnumAttributes from the database.
func (DB) GetThingWithCompositeEnumAttributessByNameBranchAndDate ¶ added in v1.14.0
func (d DB) GetThingWithCompositeEnumAttributessByNameBranchAndDate(ctx context.Context, input db.GetThingWithCompositeEnumAttributessByNameBranchAndDateInput) ([]models.ThingWithCompositeEnumAttributes, error)
GetThingWithCompositeEnumAttributessByNameBranchAndDate retrieves a list of ThingWithCompositeEnumAttributess from the database.
func (DB) GetThingWithDateRange ¶
func (d DB) GetThingWithDateRange(ctx context.Context, name string, date strfmt.DateTime) (*models.ThingWithDateRange, error)
GetThingWithDateRange retrieves a ThingWithDateRange from the database.
func (DB) GetThingWithDateRangesByNameAndDate ¶ added in v1.8.0
func (d DB) GetThingWithDateRangesByNameAndDate(ctx context.Context, input db.GetThingWithDateRangesByNameAndDateInput) ([]models.ThingWithDateRange, error)
GetThingWithDateRangesByNameAndDate retrieves a list of ThingWithDateRanges from the database.
func (DB) GetThingWithRequiredFields ¶ added in v1.13.0
func (d DB) GetThingWithRequiredFields(ctx context.Context, name string) (*models.ThingWithRequiredFields, error)
GetThingWithRequiredFields retrieves a ThingWithRequiredFields from the database.
func (DB) GetThingWithUnderscores ¶ added in v1.7.1
func (d DB) GetThingWithUnderscores(ctx context.Context, iDApp string) (*models.ThingWithUnderscores, error)
GetThingWithUnderscores retrieves a ThingWithUnderscores from the database.
func (DB) GetThingsByNameAndCreatedAt ¶ added in v1.8.0
func (d DB) GetThingsByNameAndCreatedAt(ctx context.Context, input db.GetThingsByNameAndCreatedAtInput) ([]models.Thing, error)
GetThingsByNameAndCreatedAt retrieves a list of Things from the database.
func (DB) GetThingsByNameAndVersion ¶ added in v1.8.0
func (d DB) GetThingsByNameAndVersion(ctx context.Context, input db.GetThingsByNameAndVersionInput) ([]models.Thing, error)
GetThingsByNameAndVersion retrieves a list of Things from the database.
func (DB) SaveSimpleThing ¶
SaveSimpleThing saves a SimpleThing to the database.
func (DB) SaveTeacherSharingRule ¶ added in v1.12.0
SaveTeacherSharingRule saves a TeacherSharingRule to the database.
func (DB) SaveThingWithCompositeAttributes ¶ added in v1.12.0
func (d DB) SaveThingWithCompositeAttributes(ctx context.Context, m models.ThingWithCompositeAttributes) error
SaveThingWithCompositeAttributes saves a ThingWithCompositeAttributes to the database.
func (DB) SaveThingWithCompositeEnumAttributes ¶ added in v1.14.0
func (d DB) SaveThingWithCompositeEnumAttributes(ctx context.Context, m models.ThingWithCompositeEnumAttributes) error
SaveThingWithCompositeEnumAttributes saves a ThingWithCompositeEnumAttributes to the database.
func (DB) SaveThingWithDateRange ¶
SaveThingWithDateRange saves a ThingWithDateRange to the database.
func (DB) SaveThingWithRequiredFields ¶ added in v1.13.0
func (d DB) SaveThingWithRequiredFields(ctx context.Context, m models.ThingWithRequiredFields) error
SaveThingWithRequiredFields saves a ThingWithRequiredFields to the database.
func (DB) SaveThingWithUnderscores ¶ added in v1.7.1
SaveThingWithUnderscores saves a ThingWithUnderscores to the database.
type SimpleThingTable ¶
type SimpleThingTable struct { DynamoDBAPI dynamodbiface.DynamoDBAPI Prefix string TableName string ReadCapacityUnits int64 WriteCapacityUnits int64 }
SimpleThingTable represents the user-configurable properties of the SimpleThing table.
type TeacherSharingRuleTable ¶ added in v1.12.0
type TeacherSharingRuleTable struct { DynamoDBAPI dynamodbiface.DynamoDBAPI Prefix string TableName string ReadCapacityUnits int64 WriteCapacityUnits int64 }
TeacherSharingRuleTable represents the user-configurable properties of the TeacherSharingRule table.
type ThingTable ¶
type ThingTable struct { DynamoDBAPI dynamodbiface.DynamoDBAPI Prefix string TableName string ReadCapacityUnits int64 WriteCapacityUnits int64 }
ThingTable represents the user-configurable properties of the Thing table.
type ThingWithCompositeAttributesTable ¶ added in v1.12.0
type ThingWithCompositeAttributesTable struct { DynamoDBAPI dynamodbiface.DynamoDBAPI Prefix string TableName string ReadCapacityUnits int64 WriteCapacityUnits int64 }
ThingWithCompositeAttributesTable represents the user-configurable properties of the ThingWithCompositeAttributes table.
type ThingWithCompositeEnumAttributesTable ¶ added in v1.14.0
type ThingWithCompositeEnumAttributesTable struct { DynamoDBAPI dynamodbiface.DynamoDBAPI Prefix string TableName string ReadCapacityUnits int64 WriteCapacityUnits int64 }
ThingWithCompositeEnumAttributesTable represents the user-configurable properties of the ThingWithCompositeEnumAttributes table.
type ThingWithDateRangeTable ¶
type ThingWithDateRangeTable struct { DynamoDBAPI dynamodbiface.DynamoDBAPI Prefix string TableName string ReadCapacityUnits int64 WriteCapacityUnits int64 }
ThingWithDateRangeTable represents the user-configurable properties of the ThingWithDateRange table.
type ThingWithRequiredFieldsTable ¶ added in v1.13.0
type ThingWithRequiredFieldsTable struct { DynamoDBAPI dynamodbiface.DynamoDBAPI Prefix string TableName string ReadCapacityUnits int64 WriteCapacityUnits int64 }
ThingWithRequiredFieldsTable represents the user-configurable properties of the ThingWithRequiredFields table.
type ThingWithUnderscoresTable ¶ added in v1.7.1
type ThingWithUnderscoresTable struct { DynamoDBAPI dynamodbiface.DynamoDBAPI Prefix string TableName string ReadCapacityUnits int64 WriteCapacityUnits int64 }
ThingWithUnderscoresTable represents the user-configurable properties of the ThingWithUnderscores table.