model

package
v0.0.0-...-3909f8e Latest Latest
Warning

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

Go to latest
Published: May 1, 2021 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 AddPostInput

type AddPostInput struct {
	Content string `json:"content"`
}

type AuthOutput

type AuthOutput struct {
	Token string `json:"token"`
	User  *User  `json:"user"`
}

type DeletePostInput

type DeletePostInput struct {
	PostID string `json:"postId"`
}

type EditPostInput

type EditPostInput struct {
	PostID  string `json:"postId"`
	Content string `json:"content"`
}

type GetPostInput

type GetPostInput struct {
	PostID string `json:"postId"`
}

type GetPostsByUsernameInput

type GetPostsByUsernameInput struct {
	Username string `json:"username"`
}

type GetUserByUsernameInput

type GetUserByUsernameInput struct {
	Username string `json:"username"`
}

type LoginInput

type LoginInput struct {
	Username string `json:"username"`
	Password string `json:"password"`
}

type Post

type Post struct {
	ID        string     `json:"id"`
	Content   string     `json:"content"`
	Link      string     `json:"link"`
	User      *User      `json:"user"`
	CreatedAt *time.Time `json:"createdAt"`
	UpdatedAt *time.Time `json:"updatedAt"`
	DeletedAt *time.Time `json:"deletedAt"`
}

type RegisterInput

type RegisterInput struct {
	Fullname string `json:"fullname"`
	Email    string `json:"email"`
	Password string `json:"password"`
}

type User

type User struct {
	ID        string     `json:"id"`
	Username  string     `json:"username"`
	Email     string     `json:"email"`
	Fullname  *string    `json:"fullname"`
	Bio       *string    `json:"bio"`
	Admin     bool       `json:"admin"`
	CreatedAt *time.Time `json:"createdAt"`
	UpdatedAt *time.Time `json:"updatedAt"`
	DeletedAt *time.Time `json:"deletedAt"`
}

Jump to

Keyboard shortcuts

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