reg

package
v0.0.0-...-ab8d5c9 Latest Latest
Warning

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

Go to latest
Published: Oct 25, 2019 License: Apache-2.0 Imports: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DoHttpRequest

func DoHttpRequest(serverName, method, path string, body io.Reader) ([]byte, error)

func GetRegistry

func GetRegistry() string

func GetServerAddr

func GetServerAddr(code string) (string, error)

func GetTokenContext

func GetTokenContext(tokenCode string) (*context.Context, error)

func NewTokenMiddleware

func NewTokenMiddleware(cfg ...TokenMiddlewareConfig) func(ctx iris.Context)

func Register

func Register(item RegObject) error

Types

type RegObject

type RegObject struct {
	Code    string   `json:"code"`
	Name    string   `json:"name"`
	Addrs   []string `json:"addrs"`
	Content string   `json:"content"`
	Time    *md.Time `json:"time"`
}

func FindByCode

func FindByCode(code string) ([]RegObject, error)

func (RegObject) Key

func (s RegObject) Key() string

type TokenMiddlewareConfig

type TokenMiddlewareConfig struct {
	Sessions *sessions.Sessions
}

Jump to

Keyboard shortcuts

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