interfaces

package
v0.0.0-...-4ed46a5 Latest Latest
Warning

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

Go to latest
Published: Feb 1, 2016 License: MIT Imports: 2 Imported by: 4

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type BaseEndPointInfo

type BaseEndPointInfo struct {
	CurrentPath    string
	CurrentHandler http.HandlerFunc
	CurrentType    EndPointType
}

BaseEndPointInfo base interface EndPointInfo implemintation

func (BaseEndPointInfo) Handler

func (ep BaseEndPointInfo) Handler() http.HandlerFunc

Handler return setted handler of current instance

func (BaseEndPointInfo) Path

func (ep BaseEndPointInfo) Path() string

Path return setted path of current instance

func (BaseEndPointInfo) Type

func (ep BaseEndPointInfo) Type() EndPointType

Type return setted type of EndPoin of current instance

type BaseStaticContent

type BaseStaticContent struct {
	CurrentPath  template.URL
	CurrentData  template.HTML
	CurrentTitle string
}

BaseStaticContent base interface StaticContent implemintation

func (BaseStaticContent) Data

func (sc BaseStaticContent) Data() template.HTML

Data return setted HTML data of current instance

func (BaseStaticContent) Path

func (sc BaseStaticContent) Path() template.URL

Path return setted path of current instance

func (BaseStaticContent) Title

func (sc BaseStaticContent) Title() string

Title return setted title of current instance

type EndPointInfo

type EndPointInfo interface {
	Path() string
	Handler() http.HandlerFunc
	Type() EndPointType
}

EndPointInfo interface for use during plugins registering

type EndPointType

type EndPointType int

EndPointType - type of EndPointInfo Means that current EndPoint use for api or content

const (
	// EndPointContent means use current EndPoint for contenet
	EndPointContent EndPointType = iota
	// EndPointAPI means use current EndPoint for API
	EndPointAPI
)

type Plugin

type Plugin interface {
	GetHandlers() []EndPointInfo
	GetMainContent() []StaticContent
}

type StaticContent

type StaticContent interface {
	Path() template.URL
	Data() template.HTML
	Title() string
}

StaticContent interface for use for main pages

Jump to

Keyboard shortcuts

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