models

package
v0.0.0-...-dff89a0 Latest Latest
Warning

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

Go to latest
Published: Sep 5, 2019 License: MIT Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Article

type Article struct {
	Id      int    `json:"id" db:"id"`
	Title   string `json:"title" db:"title"`
	Content string `json:"content" db:"content"`
	Author  string `json:"author" db:"author"`
}

Article represents an article record.

func (Article) Validate

func (m Article) Validate() error

Validate validates the Article fields.

type Identity

type Identity interface {
	GetID() string
	GetName() string
}

type User

type User struct {
	ID   string
	Name string
}

func (User) GetID

func (u User) GetID() string

func (User) GetName

func (u User) GetName() string

Jump to

Keyboard shortcuts

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