Documentation
¶
Index ¶
Constants ¶
View Source
const (
// APIPublicKeyConfigMap is the uploadProxy Public key
APIPublicKeyConfigMap = "cdi-api-public"
)
Variables ¶
This section is empty.
Functions ¶
Types ¶
type CdiAPIAuthorizer ¶
type CdiAPIAuthorizer interface {
Authorize(req *restful.Request) (bool, string, error)
AddUserHeaders(header []string)
GetUserHeaders() []string
AddGroupHeaders(header []string)
GetGroupHeaders() []string
AddExtraPrefixHeaders(header []string)
GetExtraPrefixHeaders() []string
}
CdiAPIAuthorizer defines methods to authorize api requests
func NewAuthorizorFromConfig ¶
func NewAuthorizorFromConfig(config *restclient.Config) (CdiAPIAuthorizer, error)
NewAuthorizorFromConfig creates a new CdiAPIAuthorizor
type TokenData ¶
type TokenData struct {
PvcName string `json:"pvcName"`
Namespace string `json:"namespace"`
CreationTimestamp time.Time `json:"creationTimestamp"`
}
TokenData defines the data in the upload token
type UploadAPIServer ¶
type UploadAPIServer interface {
Start() error
}
UploadAPIServer is the public interface to the upload API
func NewUploadAPIServer ¶
func NewUploadAPIServer(bindAddress string, bindPort uint, client kubernetes.Interface, aggregatorClient aggregatorclient.Interface, authorizor CdiAPIAuthorizer) (UploadAPIServer, error)
NewUploadAPIServer returns an initialized upload api server
Source Files
¶
- apiserver.go
- authorizer.go
- util.go
Click to show internal directories.
Click to hide internal directories.