model

package
v0.0.0-...-b61ba89 Latest Latest
Warning

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

Go to latest
Published: Jul 12, 2019 License: GPL-3.0 Imports: 10 Imported by: 0

Documentation

Overview

@File: model.go @Contact: lucien@lucien.ink @Licence: (C)Copyright 2019 Lucien Shui

@Modify Time @Author @Version @Description ------------ ------- -------- ----------- 2019-06-23 14:03 Lucien 1.0 None

@File: paste.go @Contact: lucien@lucien.ink @Licence: (C)Copyright 2019 Lucien Shui

@Modify Time @Author @Version @Description ------------ ------- -------- ----------- 2019-06-23 14:03 Lucien 1.0 None

@File: paste.go @Contact: lucien@lucien.ink @Licence: (C)Copyright 2019 Lucien Shui

@Modify Time @Author @Version @Description ------------ ------- -------- ----------- 2019-06-23 14:03 Lucien 1.0 None

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Exist

func Exist(key string) bool

Types

type Permanent

type Permanent struct {
	Key       uint64 `gorm:"primary_key;index:idx"`
	Lang      string `json:"lang" gorm:"type:varchar(16)"`
	Content   string `json:"content" gorm:"type:mediumtext"`
	Password  string `json:"password" gorm:"type:varchar(32)"`
	ClientIP  string `gorm:"type:varchar(64)"`
	CreatedAt time.Time
	DeletedAt *time.Time
}

func (*Permanent) Delete

func (paste *Permanent) Delete() error

func (*Permanent) Get

func (paste *Permanent) Get() error

func (*Permanent) Save

func (paste *Permanent) Save() error

type Temporary

type Temporary struct {
	Key       string `json:"key" gorm:"type:varchar(16);primary_key;index:idx"`
	Lang      string `json:"lang" gorm:"type:varchar(16)"`
	Content   string `json:"content" gorm:"type:mediumtext"`
	Password  string `json:"password" gorm:"type:varchar(32)"`
	ClientIP  string `gorm:"type:varchar(64)"`
	CreatedAt time.Time
}

func (*Temporary) Delete

func (paste *Temporary) Delete() error

func (*Temporary) Get

func (paste *Temporary) Get() error

func (*Temporary) Save

func (paste *Temporary) Save() error

Jump to

Keyboard shortcuts

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