image

package
v0.0.0-...-d22e7c3 Latest Latest
Warning

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

Go to latest
Published: Apr 16, 2020 License: GPL-3.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

View Source
const (
	GroupEmpty          = ""
	GroupMixed          = "mixed"
	GroupPropertyKos    = "property/kos"
	GroupPropertyHotel  = "property/hotel"
	GroupPropertyHostel = "property/hostel"
	GroupPropertyHouse  = "property/house"
	GroupPropertyRoom   = "property/room"
	GroupAmenities      = "amenities"
	GroupUserKTP        = "user/ktp"
	GroupUserAvatar     = "user/avatar"
	GroupPaymentProof   = "payment/proof"
)

list of group of image

Variables

View Source
var (
	ErrTooManyTags            = errors.New("image: cannot have more than 5 tags")
	ErrTempPathNotFound       = errors.New("image: temporary path not found")
	ErrInvalidAccessAttribute = errors.New("image: invalid access attribute")
)

list of errors

Functions

This section is empty.

Types

type Access

type Access string

Access of image

func CreateAccess

func CreateAccess(allowed []string, permission []string) Access

CreateAccess return the access of image format is: allowed:[]users;priviledge:[]Permission;

type FileInfo

type FileInfo struct {
	FileName string
	Size     int64
	Header   textproto.MIMEHeader
	UserHash userentity.Hash
	Mode     Mode
	Group    Group
	Tags     string
}

FileInfo struct

type Group

type Group string

Group of image

func (Group) Validate

func (g Group) Validate() error

Validate group

type Manipulation

type Manipulation struct {
	Resize Resize
}

Manipulation struct

type Mode

type Mode string

Mode of image

const (
	ModePublic  Mode = "public"
	ModePrivate Mode = "private"
	ModeSigned  Mode = "signed"
)

list of image mode

func (Mode) Validate

func (m Mode) Validate() error

Validate mode

type Options

type Options struct {
	Manipulation *Manipulation
}

Options struct

type Resize

type Resize struct {
	Height int
	Width  int
}

Resize struct

Jump to

Keyboard shortcuts

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