model

package
v0.0.0-...-09e72e1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Feb 28, 2021 License: MIT Imports: 2 Imported by: 0

Documentation

Overview

Package model contains the models consumed by the databases.

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  `db:"Id" json:"Id"`
	ThreadId  uuid.UUID  `db:"ThreadId" json:"ThreadId"`
	Body      string     `db:"Body" json:"Body"`
	Author    string     `db:"Author" json:"Author"`
	Confirmed bool       `db:"Confirmed" json:"Confirmed"`
	CreatedAt time.Time  `db:"CreatedAt" json:"CreatedAt"`
	DeletedAt *time.Time `db:"DeletedAt" json:"DeletedAt,omitempty"`
	ReplyTo   *uuid.UUID `db:"ReplyTo" json:"ReplyTo,omitempty"`
}

Comment represents a comment in a thread

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 DataDump

type DataDump struct {
	ThreadCount  int
	CommentCount int
}

DataDump is a header used to store info about the data dump

type Thread

type Thread struct {
	Id        uuid.UUID `db:"Id" dynamo:"ID" json:"Id"`
	Path      string    `db:"Path" dynamo:"Path,hash" json:"Path"`
	CreatedAt time.Time `db:"CreatedAt" dynamo:"CreatedAt,range" json:"CreatedAt,omitempty"`
}

Thread represents a commenting thread

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)

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL