Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
Functions ¶
This section is empty.
Types ¶
type Locomotive ¶
type Locomotive struct { LocoID string `json:"loco_id" dynamodbav:"loco_id"` LocoName string `json:"loco_name" dynamodbav:"loco_name"` ImageURL string `json:"image_url" dynamodbav:"image_url" validate:"empty=false & format=url"` Description string `json:"description" dynamodbav:"description"` CreatedAT int64 `json:"created_at" dynamodbav:"created_at"` }
func (Locomotive) GetKey ¶
func (loco Locomotive) GetKey() map[string]types.AttributeValue
type LocomotiveRepository ¶
type LocomotiveRepository interface { CreateLoco(loco *Locomotive) (*Locomotive, error) GetLoco(loco_id string) (*Locomotive, error) UpdateLoco(loco *Locomotive) (*Locomotive, error) DeleteLoco(loco_id string) error GetAllLoco() (*[]Locomotive, error) }
type LocomotiveSerializer ¶
type LocomotiveSerializer interface { Decode(input []byte) (*Locomotive, error) Encode(input *Locomotive) ([]byte, error) }
type LocomotiveService ¶
type LocomotiveService interface { CreateLoco(loco *Locomotive) (*Locomotive, error) GetLoco(loco_id string) (*Locomotive, error) UpdateLoco(loco *Locomotive) (*Locomotive, error) DeleteLoco(loco_id string) error GetAllLoco() (*[]Locomotive, error) }
func NewLocomotiveService ¶
func NewLocomotiveService(locoRepo LocomotiveRepository) LocomotiveService
Click to show internal directories.
Click to hide internal directories.