controller

package
v0.0.0-...-02b665c Latest Latest
Warning

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

Go to latest
Published: Sep 4, 2019 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Overview

  • Copyright 2019 gosoon. *

  • Licensed under the Apache License, Version 2.0 (the "License");

  • you may not use this file except in compliance with the License.

  • You may obtain a copy of the License at *

  • http://www.apache.org/licenses/LICENSE-2.0 *

  • Unless required by applicable law or agreed to in writing, software

  • distributed under the License is distributed on an "AS IS" BASIS,

  • WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.

  • See the License for the specific language governing permissions and

  • limitations under the License.

  • Copyright 2019 gosoon. *

  • Licensed under the Apache License, Version 2.0 (the "License");

  • you may not use this file except in compliance with the License.

  • You may obtain a copy of the License at *

  • http://www.apache.org/licenses/LICENSE-2.0 *

  • Unless required by applicable law or agreed to in writing, software

  • distributed under the License is distributed on an "AS IS" BASIS,

  • WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.

  • See the License for the specific language governing permissions and

  • limitations under the License.

This package has the automatically generated type controller.

  • Copyright 2019 gosoon. *
  • Licensed under the Apache License, Version 2.0 (the "License");
  • you may not use this file except in compliance with the License.
  • You may obtain a copy of the License at *
  • http://www.apache.org/licenses/LICENSE-2.0 *
  • Unless required by applicable law or agreed to in writing, software
  • distributed under the License is distributed on an "AS IS" BASIS,
  • WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  • See the License for the specific language governing permissions and
  • limitations under the License.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func BadRequest

func BadRequest(w http.ResponseWriter, r *http.Request, err error)

BadRequest will return an error message indicating that the request is invalid

func Conflict

func Conflict(w http.ResponseWriter, r *http.Request, err error)

Conflict xxx

func Forbidden

func Forbidden(w http.ResponseWriter, r *http.Request, err error)

Forbidden will block user access the resource, not authorized

func InternalError

func InternalError(w http.ResponseWriter, r *http.Request, err error)

InternalError will return an error message indicating that the something is error inside the controller

func NotAcceptable

func NotAcceptable(w http.ResponseWriter, r *http.Request, err error)

NotAcceptable xxx

func OK

func OK(w http.ResponseWriter, r *http.Request, message string)

OK reply

func ResourceNotFound

func ResourceNotFound(w http.ResponseWriter, r *http.Request, message string)

ResourceNotFound will return an error message indicating that the resource is not exist

func Response

func Response(w http.ResponseWriter, r *http.Request, httpCode int, message interface{})

Response : http response func (no return http code)

func ServiceUnavailable

func ServiceUnavailable(w http.ResponseWriter, r *http.Request, err error)

ServiceUnavailable will return an error message indicating that the service is not available now

func Unauthorized

func Unauthorized(w http.ResponseWriter, r *http.Request, err error)

Unauthorized will block user access the api, not login

Types

type Controller

type Controller interface {
	Register(router *mux.Router)
}

Controller helps register to router.

type Options

type Options struct {
	KubeClientset kubernetes.Interface
	Service       service.Interface
}

Options contains the config by controller

Directories

Path Synopsis
* Copyright 2019 gosoon.
* Copyright 2019 gosoon.

Jump to

Keyboard shortcuts

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