Documentation ¶
Index ¶
- Constants
- func GetEnvDefault(variable string, defaultVal string) string
- func IncRequestCounter(kind string, user string, action string, path string)
- func IncRequestErrorCounter(kind string, user string, action string, path string, severity string)
- func Index(w http.ResponseWriter, r *http.Request)
- func Logger(inner http.Handler, name string) http.Handler
- func NewRouter(kfamV1Alpha1 KfamV1Alpha1Interface) *mux.Router
- type Binding
- type BindingClient
- type BindingEntries
- type BindingInterface
- type KfamV1Alpha1Client
- func (c *KfamV1Alpha1Client) CreateBinding(w http.ResponseWriter, r *http.Request)
- func (c *KfamV1Alpha1Client) CreateProfile(w http.ResponseWriter, r *http.Request)
- func (c *KfamV1Alpha1Client) DeleteBinding(w http.ResponseWriter, r *http.Request)
- func (c *KfamV1Alpha1Client) DeleteProfile(w http.ResponseWriter, r *http.Request)
- func (c *KfamV1Alpha1Client) QueryClusterAdmin(w http.ResponseWriter, r *http.Request)
- func (c *KfamV1Alpha1Client) ReadBinding(w http.ResponseWriter, r *http.Request)
- type KfamV1Alpha1Interface
- type ProfileClient
- func (c *ProfileClient) Create(profile *v1beta1.Profile) (*v1beta1.Profile, error)
- func (c *ProfileClient) Delete(name string, opts *metav1.DeleteOptions) error
- func (c *ProfileClient) Get(name string, opts metav1.GetOptions) (*v1beta1.Profile, error)
- func (c *ProfileClient) List(opts metav1.ListOptions) (*v1beta1.ProfileList, error)
- func (c *ProfileClient) Update(profile *v1beta1.Profile) (*v1beta1.Profile, error)
- type ProfileInterface
- type Route
- type Routes
Constants ¶
View Source
const ACTION = "action"
View Source
const AuthorizationPolicy = "authorizationpolicies"
View Source
const COMPONENT = "component"
View Source
const KFAM = "kfam"
View Source
const KIND = "kind"
View Source
const MAX_TAG_LEN = 30
View Source
const PATH = "path"
View Source
const Profiles = "profiles"
View Source
const REQUSER = "user"
User that make the request
View Source
const ROLE = "role"
View Source
const SEVERITY = "severity"
View Source
const SEVERITY_CRITICAL = "critical"
View Source
const SEVERITY_MAJOR = "major"
View Source
const SEVERITY_MINOR = "minor"
View Source
const USER = "user"
Variables ¶
This section is empty.
Functions ¶
func GetEnvDefault ¶
func IncRequestCounter ¶
func IncRequestErrorCounter ¶
func NewRouter ¶
func NewRouter(kfamV1Alpha1 KfamV1Alpha1Interface) *mux.Router
Types ¶
type Binding ¶
type Binding struct { User *rbacv1.Subject `json:"user,omitempty"` ReferredNamespace string `json:"referredNamespace,omitempty"` RoleRef *rbacv1.RoleRef `json:"RoleRef,omitempty"` // Status of the profile, one of Succeeded, Failed, Unknown. Status string `json:"status,omitempty"` }
Binding will give user edit access to referredNamespace
type BindingClient ¶
type BindingClient struct {
// contains filtered or unexported fields
}
func (*BindingClient) Create ¶
func (c *BindingClient) Create(binding *Binding, userIdHeader string, userIdPrefix string) error
func (*BindingClient) Delete ¶
func (c *BindingClient) Delete(binding *Binding) error
func (*BindingClient) List ¶
func (c *BindingClient) List(user string, namespaces []string, role string) (*BindingEntries, error)
type BindingEntries ¶
type BindingEntries struct {
Bindings []Binding `json:"bindings,omitempty"`
}
type BindingInterface ¶
type KfamV1Alpha1Client ¶
type KfamV1Alpha1Client struct {
// contains filtered or unexported fields
}
func NewKfamClient ¶
func NewKfamClient(userIdHeader string, userIdPrefix string, clusterAdmin string) (*KfamV1Alpha1Client, error)
func (*KfamV1Alpha1Client) CreateBinding ¶
func (c *KfamV1Alpha1Client) CreateBinding(w http.ResponseWriter, r *http.Request)
func (*KfamV1Alpha1Client) CreateProfile ¶
func (c *KfamV1Alpha1Client) CreateProfile(w http.ResponseWriter, r *http.Request)
func (*KfamV1Alpha1Client) DeleteBinding ¶
func (c *KfamV1Alpha1Client) DeleteBinding(w http.ResponseWriter, r *http.Request)
func (*KfamV1Alpha1Client) DeleteProfile ¶
func (c *KfamV1Alpha1Client) DeleteProfile(w http.ResponseWriter, r *http.Request)
func (*KfamV1Alpha1Client) QueryClusterAdmin ¶
func (c *KfamV1Alpha1Client) QueryClusterAdmin(w http.ResponseWriter, r *http.Request)
func (*KfamV1Alpha1Client) ReadBinding ¶
func (c *KfamV1Alpha1Client) ReadBinding(w http.ResponseWriter, r *http.Request)
type KfamV1Alpha1Interface ¶
type KfamV1Alpha1Interface interface { CreateBinding(w http.ResponseWriter, r *http.Request) CreateProfile(w http.ResponseWriter, r *http.Request) DeleteBinding(w http.ResponseWriter, r *http.Request) DeleteProfile(w http.ResponseWriter, r *http.Request) ReadBinding(w http.ResponseWriter, r *http.Request) QueryClusterAdmin(w http.ResponseWriter, r *http.Request) }
type ProfileClient ¶
type ProfileClient struct {
// contains filtered or unexported fields
}
func (*ProfileClient) Delete ¶
func (c *ProfileClient) Delete(name string, opts *metav1.DeleteOptions) error
func (*ProfileClient) Get ¶
func (c *ProfileClient) Get(name string, opts metav1.GetOptions) (*v1beta1.Profile, error)
func (*ProfileClient) List ¶
func (c *ProfileClient) List(opts metav1.ListOptions) (*v1beta1.ProfileList, error)
type ProfileInterface ¶
type ProfileInterface interface { Create(profile *v1beta1.Profile) (*v1beta1.Profile, error) Delete(name string, opts *metav1.DeleteOptions) error Get(name string, opts metav1.GetOptions) (*v1beta1.Profile, error) List(opts metav1.ListOptions) (*v1beta1.ProfileList, error) Update(profile *v1beta1.Profile) (*v1beta1.Profile, error) }
Click to show internal directories.
Click to hide internal directories.