watermark

package
v0.0.0-...-83adff0 Latest Latest
Warning

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

Go to latest
Published: Jul 6, 2020 License: GPL-3.0 Imports: 1 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// TypeName 带用户名的水印.
	TypeName = 1
	// TypeUID 带uid的水印.
	TypeUID = 2
	// TypeNewName 用户名和logo位置为上下的水印.
	TypeNewName = 3
	// StatClose 未开启水印.
	StatClose = 0
	// StatOpen 开启水印.
	StatOpen = 1
	// StatPreview 预览水印(不写入数据库).
	StatPreview = 2
	// PosLeftTop 水印位置左上角.
	PosLeftTop = 1
	// PosRightTop 水印位置右上角.
	PosRightTop = 2
	// PosLeftBottom 水印位置左下角.
	PosLeftBottom = 3
	// PosRightBottom 水印位置右下角.
	PosRightBottom = 4
)

Variables

This section is empty.

Functions

func IsPos

func IsPos(pos int8) bool

IsPos check position.

func IsState

func IsState(st int8) bool

IsState check state.

func IsType

func IsType(ty int8) bool

IsType check type.

Types

type GenWatermark

type GenWatermark struct {
	Location string `json:"location"`
	MD5      string `json:"md5"` // 文件的hash值
	Width    int    `json:"width"`
	Height   int    `json:"height"`
}

GenWatermark for wm api.

type Image

type Image struct {
	Width  int `json:"width"`
	Height int `json:"height"`
}

Image image width & height.

type Msg

type Msg struct {
	Action string    `json:"action"`
	Old    *UserInfo `json:"old"`
	New    *UserInfo `json:"new"`
}

Msg from passport.

type UserInfo

type UserInfo struct {
	MID    int64  `json:"mid"`
	Uname  string `json:"uname"`
	UserID string `json:"userid"`
}

UserInfo user modify detail.

type Watermark

type Watermark struct {
	ID    int64     `json:"id"`
	MID   int64     `json:"mid"`
	Uname string    `json:"uname"`
	State int8      `json:"state"`
	Ty    int8      `json:"type"`
	Pos   int8      `json:"position"`
	URL   string    `json:"url"`
	MD5   string    `json:"md5"`
	Info  string    `json:"info"`
	Tip   string    `json:"tip"`
	CTime time.Time `json:"ctime"`
	MTime time.Time `json:"mtime"`
}

Watermark watermark info.

type WatermarkParam

type WatermarkParam struct {
	MID   int64
	State int8
	Ty    int8
	Pos   int8
	Sync  int8
	IP    string
}

WatermarkParam set watermark param

Jump to

Keyboard shortcuts

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