cf_checkpermission

package
v1.80.0 Latest Latest
Warning

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

Go to latest
Published: May 15, 2024 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type CfCheckPermission

type CfCheckPermission struct{}

func NewCfCheckPermission

func NewCfCheckPermission() *CfCheckPermission

func (CfCheckPermission) Handler

func (CfCheckPermission) Handler(proxyRoute gobis.ProxyRoute, params interface{}, next http.Handler) (http.Handler, error)

func (CfCheckPermission) Schema

func (CfCheckPermission) Schema() interface{}

type CfCheckPermissionConfig

type CfCheckPermissionConfig struct {
	CfCheckPermission *CfCheckPermissionOptions `mapstructure:"cf_checkpermission" json:"cf_checkpermission" yaml:"cf_checkpermission"`
}

type CfCheckPermissionHandler

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

func NewCfCheckPermissionHandler

func NewCfCheckPermissionHandler(options *CfCheckPermissionOptions, next http.Handler) *CfCheckPermissionHandler

func (CfCheckPermissionHandler) ServeHTTP

type CfCheckPermissionOptions

type CfCheckPermissionOptions struct {
	// enable cloud foundry check permission instance
	Enabled bool `mapstructure:"enabled" json:"enabled" yaml:"enabled"`
	// cf api endpoint to call to do the check
	ApiEndpoint string `mapstructure:"api_endpoint" json:"api_endpoint" yaml:"api_endpoint"`
	// Service instance guid to check if user has permission on it
	InstanceGUID string `mapstructure:"instance_guid" json:"instance_guid" yaml:"instance_guid"`
	// Set to true to only permit user which has a manage permission (and not only read permission)
	OnlyManager bool `mapstructure:"only_manager" json:"only_manager" yaml:"only_manager"`
}

type CfPermissionResp

type CfPermissionResp struct {
	Manage bool `json:"manage"`
	Read   bool `json:"read"`
}

Jump to

Keyboard shortcuts

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