Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ToSelfSubjectAccessReview ¶
func ToSelfSubjectAccessReview(namespace, name, resource, verb string) *v1.SelfSubjectAccessReview
ToSelfSubjectAccessReview creates kubernetes API object based on provided data.
Types ¶
type CanIResponse ¶
type CanIResponse struct {
Allowed bool `json:"allowed"`
}
CanIResponse is used to as response to check whether or not user is allowed to access given endpoint.
type ClientManager ¶
type ClientManager interface { Client(req *restful.Request) (kubernetes.Interface, error) InsecureClient() kubernetes.Interface CanI(req *restful.Request, ssar *v1.SelfSubjectAccessReview) bool Config(req *restful.Request) (*rest.Config, error) ClientCmdConfig(req *restful.Request) (clientcmd.ClientConfig, error) CSRFKey() string HasAccess(authInfo api.AuthInfo) error VerberClient(req *restful.Request) (ResourceVerber, error) SetTokenManager(manager authApi.TokenManager) }
ClientManager is responsible for initializing and creating clients to communicate with kubernetes apiserver on demand.
type ResourceVerber ¶
type ResourceVerber interface { Put(kind string, namespaceSet bool, namespace string, name string, object *runtime.Unknown) error Get(kind string, namespaceSet bool, namespace string, name string) (runtime.Object, error) Delete(kind string, namespaceSet bool, namespace string, name string) error }
ResourceVerber is responsible for performing generic CRUD operations on all supported resources.
Click to show internal directories.
Click to hide internal directories.