service

package
v0.10.0 Latest Latest
Warning

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

Go to latest
Published: Sep 13, 2017 License: Apache-2.0 Imports: 21 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetKeys added in v0.3.0

func GetKeys(c *cli.Context) (*rsa.PrivateKey, *rsa.PublicKey, error)

func HandleError

func HandleError(s *v1client.Schemas, t func(http.ResponseWriter, *http.Request) (int, error)) http.Handler

func NewRouter

func NewRouter(r *RouteHandler) *mux.Router

func VersionHandler added in v0.7.0

func VersionHandler(schemas *v1client.Schemas) http.Handler

Types

type ClientFactory added in v0.3.0

type ClientFactory struct{}

func (*ClientFactory) GetClient added in v0.3.0

func (f *ClientFactory) GetClient(projectID string) (*client.RancherClient, error)

type RancherClientFactory

type RancherClientFactory interface {
	GetClient(projectID string) (*client.RancherClient, error)
}

type RouteHandler

type RouteHandler struct {
	ClientFactory RancherClientFactory
	PrivateKey    *rsa.PrivateKey
	PublicKey     *rsa.PublicKey
}

func (*RouteHandler) ConstructPayload

func (rh *RouteHandler) ConstructPayload(w http.ResponseWriter, r *http.Request) (int, error)

func (*RouteHandler) DeleteWebhook added in v0.3.0

func (rh *RouteHandler) DeleteWebhook(w http.ResponseWriter, r *http.Request) (int, error)

func (*RouteHandler) Execute

func (rh *RouteHandler) Execute(w http.ResponseWriter, r *http.Request) (int, error)

func (*RouteHandler) ExecuteWithJwt added in v0.9.0

func (rh *RouteHandler) ExecuteWithJwt(jwtSigned string, requestBody interface{}) (int, error)

func (*RouteHandler) ExecuteWithKey added in v0.9.0

func (rh *RouteHandler) ExecuteWithKey(uuid string, projectID string, requestBody interface{}) (int, error)

func (*RouteHandler) GetWebhook added in v0.3.0

func (rh *RouteHandler) GetWebhook(w http.ResponseWriter, r *http.Request) (int, error)

func (*RouteHandler) ListWebhooks added in v0.3.0

func (rh *RouteHandler) ListWebhooks(w http.ResponseWriter, r *http.Request) (int, error)

Jump to

Keyboard shortcuts

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