Documentation ¶
Index ¶
Constants ¶
View Source
const ( ItemHasKeyAttribute string = "pk" ItemSortKeyAttribute string = "sk" ItemGsi1KeyAttribute string = "gsi1_pk" ItemGsi1IndexName string = "GSI1" )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ClientWrapper ¶
type ClientWrapper struct {
// contains filtered or unexported fields
}
func NewClientWrapper ¶
func NewClientWrapper(region string) *ClientWrapper
func NewClientWrapperFromClient ¶
func NewClientWrapperFromClient(client *dynamodb.Client) *ClientWrapper
func (*ClientWrapper) GetItem ¶
func (client *ClientWrapper) GetItem(input *dynamodb.GetItemInput) (*dynamodb.GetItemOutput, error)
func (*ClientWrapper) PutItem ¶
func (client *ClientWrapper) PutItem(input *dynamodb.PutItemInput) (*dynamodb.PutItemOutput, error)
func (*ClientWrapper) QueryItem ¶
func (client *ClientWrapper) QueryItem(input *dynamodb.QueryInput) (*dynamodb.QueryOutput, error)
type DbClient ¶
type DbClient interface { PutItem(input *dynamodb.PutItemInput) (*dynamodb.PutItemOutput, error) GetItem(input *dynamodb.PutItemInput) (*dynamodb.PutItemOutput, error) QueryItem(input *dynamodb.QueryInput) (*dynamodb.QueryOutput, error) }
type EventRepository ¶
type EventRepository struct {
// contains filtered or unexported fields
}
func NewEventRepository ¶
func NewEventRepository(region string, tableName string, logger *zap.Logger) *EventRepository
func NewLocalEventRepository ¶
func (*EventRepository) GetBookingEventsByBID ¶
func (repo *EventRepository) GetBookingEventsByBID(bookingId string) (*[]booking.Event, error)
type Item ¶
type Item struct { Pk string `json:"pk" dynamodbav:"pk"` Sk string `json:"sk" dynamodbav:"sk"` Gsi1Pk string `json:"gsi1_pk" dynamodbav:"gsi1_pk"` EventId string `json:"event_id" dynamodbav:"event_id"` BookingId string `json:"booking_id" dynamodbav:"booking_id"` UserId string `json:"user_id" dynamodbav:"user_id"` TripFrom string `json:"from" dynamodbav:"from"` TripUntil string `json:"until" dynamodbav:"until"` HotelName string `json:"hotel_name" dynamodbav:"hotel_name"` HotelId string `json:"hotel_id" dynamodbav:"hotel_id"` FlightId string `json:"flight_id" dynamodbav:"flight_id"` AirlineName string `json:"airline_name" dynamodbav:"airline_name"` State booking.State `json:"state" dynamodbav:"state"` }
Click to show internal directories.
Click to hide internal directories.