common

package
v0.0.0-...-1d6d57a Latest Latest
Warning

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

Go to latest
Published: May 18, 2020 License: MIT Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func FileLoad

func FileLoad(filepath string) []byte

func MD5V

func MD5V(str string) string

func RSAKeyGen

func RSAKeyGen(bits int) error

Types

type RSA

type RSA struct {
	Publickey  []byte
	Privatekey []byte
}

func NewRSA

func NewRSA() *RSA

func (*RSA) RSADecrypt

func (r *RSA) RSADecrypt(cipertext []byte) ([]byte, error)

func (*RSA) RSAEncrypt

func (r *RSA) RSAEncrypt(orgidata []byte) ([]byte, error)

type Server

type Server struct {
	// contains filtered or unexported fields
}

func NewCRUDServer

func NewCRUDServer(servs ...CRUDServer) *Server

func (*Server) Run

func (s *Server) Run(port string)

type SessionData

type SessionData struct {
	Id   string `json:"id" bson:"_id"`
	Name string `json:"name" bson:"name"`
}

func ParseSession

func ParseSession(r *http.Request, name string) (*SessionData, error)

Jump to

Keyboard shortcuts

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