model

package
v0.0.0-...-d63a0bf Latest Latest
Warning

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

Go to latest
Published: Mar 1, 2024 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type GithubRepo

type GithubRepo struct {
	Name         string    `json:"name" db:"name,omitempty"`
	Url          string    `json:"url" db:"url,omitempty"`
	Description  string    `json:"description" db:"description,omitempty"`
	Color        string    `json:"color" db:"color,omitempty"`
	Lang         string    `json:"lang" db:"lang,omitempty"`
	Fork         string    `json:"fork" db:"fork,omitempty"`
	Stars        string    `json:"stars" db:"stars,omitempty"`
	StarsToday   string    `json:"starsToday" db:"stars_today,omitempty"`
	BuildBy      string    `json:"-" db:"build_by,omitempty"`
	Bookmarked   bool      `json:"bookmarked"`
	Contributors []string  `json:"contributors,omitempty"`
	CreatedAt    time.Time `json:"-" db:"created_at,omitempty"`
	UpdatedAt    time.Time `json:"-" db:"updated_at,omitempty"`
}

type JwtCustomClaims

type JwtCustomClaims struct {
	UserId string
	Role   string
	jwt.StandardClaims
}

type Response

type Response struct {
	StatusCode int         `json:"code,omitempty"`
	Message    string      `json:"message,omitempty"`
	Data       interface{} `json:"data,omitempty"`
}

type Role

type Role int
const (
	MEMBER Role = iota
	ADMIN
)

func (Role) String

func (r Role) String() string

type User

type User struct {
	UserId    string    `json:"-" db:"user_id, omitempty"`
	FullName  string    `json:"fullName,omitempty" db:"full_name, omitempty"`
	Email     string    `json:"email,omitempty" db:"email, omitempty"`
	Password  string    `json:"-" db:"password, omitempty"`
	Role      string    `json:"-" db:"role, omitempty"`
	CreatedAt time.Time `json:"-" db:"created_at, omitempty"`
	UpdatedAt time.Time `json:"-" db:"updated_at, omitempty"`
	Token     string    `json:"token,omitempty"`
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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