web

package
v0.0.0-...-f2087ef Latest Latest
Warning

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

Go to latest
Published: Oct 13, 2016 License: MIT Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Loop

func Loop(fn func(Engine) error) error

Loop loop engines

func RandomBytes

func RandomBytes(n uint) ([]byte, error)

RandomBytes random bytes

func RandomStr

func RandomStr(n int) string

RandomStr randome string

func Register

func Register(ens ...Engine)

Register register engines

func Run

func Run(version string) error

Run entry

func Shell

func Shell(cmd string, args ...string) error

Shell exec shell command

Types

type Encryptor

type Encryptor struct {
	Cip cipher.Block `inject:"aes.cip"`
	Key []byte       `inject:"hmac.key"`
}

Encryptor encryptor

func (*Encryptor) Chk

func (p *Encryptor) Chk(plain, code []byte) bool

Chk check password

func (*Encryptor) Decrypt

func (p *Encryptor) Decrypt(buf []byte) ([]byte, error)

Decrypt decrypt buffer

func (*Encryptor) Encrypt

func (p *Encryptor) Encrypt(buf []byte) ([]byte, error)

Encrypt encrypt buffer

func (*Encryptor) Sum

func (p *Encryptor) Sum(plain []byte) []byte

Sum sum a password

type Engine

type Engine interface {
	Map(*inject.Graph) error
	Mount(*gin.Engine)
	Worker()
	Shell() []cli.Command
}

Engine web engine

type Model

type Model struct {
	ID        uint      `gorm:"primary_key" json:"id"`
	CreatedAt time.Time `json:"updated_at"`
	UpdatedAt time.Time `json:"created_at"`
}

Model basic db model

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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