story

package
v0.0.0-...-72c0d7f Latest Latest
Warning

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

Go to latest
Published: Jan 8, 2023 License: MIT Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Page

type Page struct {
	Id      int64         `json:"id"`
	Author  int64         `json:"author_id"`
	Action  string        `json:"action"             validate:"gte=0,lte=64"`
	Body    string        `json:"body"              validate:"gte=0,lte=4096"`
	HasImg  bool          `json:"has_img"`
	Choices []PageChoices `json:"choices"`
}

type PageChoices

type PageChoices struct {
	Id     int64  `json:"page_id"`
	Action string `json:"action"`
}

type Service

type Service struct {
	// contains filtered or unexported fields
}

func NewService

func NewService(queries *db.Queries) *Service

func (*Service) PublicRoutes

func (s *Service) PublicRoutes(r chi.Router)

func (*Service) UserRoutes

func (s *Service) UserRoutes(r chi.Router)

type StoryCard

type StoryCard struct {
	Id          int64  `json:"id"`
	Title       string `json:"title"`
	Description string `json:"description"`
	AuthorName  string `json:"author_name"`
	HasImg      bool   `json:"has_img"`
	Featured    bool   `json:"is_featured"`
}

type StoryCreation

type StoryCreation struct {
	Id          int64  `json:"id"`
	Title       string `json:"title"         validate:"required,gte=0,lte=48"`
	Description string `json:"description"   validate:"lte=512"`
	AuthorId    int64  `json:"author_id"`
}

type StoryDetails

type StoryDetails struct {
	Id            int64  `json:"id"`
	Title         string `json:"title"`
	Description   string `json:"description"`
	First_page_id int64  `json:"first_page_id"`
	AuthorName    string `json:"author_name"`
	HasImg        bool   `json:"has_img"`
}

Jump to

Keyboard shortcuts

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