models

package
v0.0.0-...-cd25f5e Latest Latest
Warning

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

Go to latest
Published: Mar 12, 2022 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

View Source
const API_URL = "https://what-to-code.com/api"

Variables

This section is empty.

Functions

This section is empty.

Types

type Idea

type Idea struct {
	Description string `json:"description,omitempty"`
	Id          int    `json:"id,omitempty"`
	Likes       int    `json:"likes,omitempty"`
	Title       string `json:"title,omitempty"`
	Tags        []Tag  `json:"tags,omitempty"`
}

type IdeaModel

type IdeaModel struct {
	Order string
	// contains filtered or unexported fields
}

func NewIdeaModel

func NewIdeaModel() IdeaModel

func (*IdeaModel) Clear

func (i *IdeaModel) Clear()

func (IdeaModel) Init

func (i IdeaModel) Init() tea.Cmd

func (IdeaModel) Like

func (i IdeaModel) Like()

func (IdeaModel) Update

func (i IdeaModel) Update(msg tea.Msg) (IdeaModel, tea.Cmd)

func (IdeaModel) View

func (i IdeaModel) View() string

type SubmitModel

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

func NewSubmitModel

func NewSubmitModel() SubmitModel

func (*SubmitModel) Clear

func (s *SubmitModel) Clear()

func (SubmitModel) Init

func (s SubmitModel) Init() tea.Cmd

func (SubmitModel) Update

func (s SubmitModel) Update(msg tea.Msg) (SubmitModel, tea.Cmd)

func (SubmitModel) View

func (s SubmitModel) View() string

type Tag

type Tag struct {
	Value string `json:"value,omitempty"`
}

Jump to

Keyboard shortcuts

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