Documentation ¶
Overview ¶
Package model deals with specific models for dynamodb(they might be a bit different to db/model). It allows for sorting of the given models and transformation to db/model equivalents.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Comment ¶
type Comment struct { Id uuid.UUID `dynamo:"ID,hash"` ThreadId uuid.UUID `dynamo:"ThreadId" index:"ThreadId_index,hash"` Body string `dynamo:"Body"` Author string `dynamo:"Author"` Confirmed bool `dynamo:"Confirmed"` CreatedAt time.Time `dynamo:"CreatedAt"` DeletedAt *int64 `dynamo:"DeletedAt,omitempty"` ReplyTo *string `dynamo:"ReplyTo,omitempty"` }
Comment represents a comment in a thread
func (*Comment) FromComment ¶
FromComment converts mouthful comment object to dynamodb comment
type CommentSlice ¶
type CommentSlice []Comment
CommentSlice represents a collection of comments
func (CommentSlice) Len ¶
func (cs CommentSlice) Len() int
func (CommentSlice) Less ¶
func (cs CommentSlice) Less(i, j int) bool
func (CommentSlice) Swap ¶
func (cs CommentSlice) Swap(i, j int)
type Thread ¶
type Thread struct { Id uuid.UUID `dynamo:"ID"` Path string `dynamo:"Path,hash"` CreatedAt time.Time `dynamo:"CreatedAt"` }
Thread represents a commenting thread for dynamodb. This is needed since we store threads a bit differently than in a relational database
type ThreadSlice ¶
type ThreadSlice []Thread
ThreadSlice represents a collection of threads
func (ThreadSlice) Len ¶
func (ts ThreadSlice) Len() int
func (ThreadSlice) Less ¶
func (ts ThreadSlice) Less(i, j int) bool
func (ThreadSlice) Swap ¶
func (ts ThreadSlice) Swap(i, j int)
Click to show internal directories.
Click to hide internal directories.