Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var (
DB *pgxpool.Pool
)
View Source
var (
Logr *slog.Logger
)
Functions ¶
func SetupLogger ¶
func SetupLogger()
Types ¶
type Comment ¶
type Comment struct {
//Unique ID for this post
ID uint64 `json:"id"`
//The foreign key back to the tasks
TaskID uint32 `json:"taskId"`
//Optionally the person can leave a username
User *string `json:"user"`
//The comment box
Content string `json:"comment"`
//The time the comment was created
CreatedAt time.Time `json:"createdAt"`
}
type ControllerError ¶
type ControllerError struct {
//Msg is a string field to capture a custom error message
Msg string `json:"msg"`
//Func is the name of the function the error occured in
Func string `json:"func"`
//Reason is a longer explication of what happened, could be a message from library
Reason string `json:"reason"`
//Cause is a pointer to why this error is being raised, e.g, error from sub functions
Cause *ControllerError `json:"cause"`
}
ControllerError - An error with nested response
func (*ControllerError) Error ¶
func (e *ControllerError) Error() string
type FileManager ¶
func NewFileManager ¶
func NewFileManager() FileManager
type Task ¶
type Task struct {
ID uint32 `json:"id"`
Status bool `json:"status"`
Title string `json:"title"`
Body *string `json:"body"`
Score int32 `json:"score"`
CompletedAt *time.Time `json:"completedAt"`
CreatedAt time.Time `json:"createdAt"`
DeletedAt time.Time `json:"deletedAt"`
Comments []Comment `json:"comments"`
Images []string `json:"images"` //paths to get all of the images associated with task
}
Source Files
¶
Click to show internal directories.
Click to hide internal directories.