Documentation ¶
Index ¶
- Constants
- func CheckMAC(message, messageMAC, key []byte) bool
- func IsSignedURLValid(requestURL, namespace string) (bool, error)
- func SignURL(signedUrl *url.URL, namespace string, ttl time.Duration) error
- func StringToIntPointer(x string) (*int64, error)
- type EnsureResourcesOpts
- type LocalVolumeObjectStore
- func (o *LocalVolumeObjectStore) CreateSignedURL(bucket, key string, ttl time.Duration) (string, error)
- func (o *LocalVolumeObjectStore) DeleteObject(bucket, key string) error
- func (o *LocalVolumeObjectStore) GetObject(bucket, key string) (io.ReadCloser, error)
- func (o *LocalVolumeObjectStore) Init(config map[string]string) error
- func (o *LocalVolumeObjectStore) ListCommonPrefixes(bucket, prefix, delimiter string) ([]string, error)
- func (o *LocalVolumeObjectStore) ListObjects(bucket, prefix string) ([]string, error)
- func (o *LocalVolumeObjectStore) ObjectExists(bucket, key string) (bool, error)
- func (o *LocalVolumeObjectStore) PutObject(bucket string, key string, body io.Reader) error
- type VolumeType
Constants ¶
const ( // VeleroDeploymentName = "velero-7w2lnkp-nginxt" NodeAgentDaemonsetName = "node-agent" ResticDaemonsetName = "restic" )
const VolumeProviderKey = "app"
const VolumeProviderLabel = "velero"
Variables ¶
This section is empty.
Functions ¶
func IsSignedURLValid ¶
IsSignedURL validates the expiration and signature of a signed url. Namespace is used to get the signing key from a k8s secret.
func SignURL ¶
SignURL takes in a URL and adds a sha1 signature and expiration to it. Namespace is used to create or get the signing key from a k8s secret.
func StringToIntPointer ¶
StringToIntPointer converts a string to a pointer to an int.
Types ¶
type EnsureResourcesOpts ¶
type EnsureResourcesOpts struct {
// contains filtered or unexported fields
}
type LocalVolumeObjectStore ¶
type LocalVolumeObjectStore struct {
// contains filtered or unexported fields
}
func NewLocalVolumeObjectStore ¶
func NewLocalVolumeObjectStore(log logrus.FieldLogger, v VolumeType) *LocalVolumeObjectStore
NewLocalVolumeObjectStore instantiates a LocalVolumeObjectStore with a particular target volume type.
func (*LocalVolumeObjectStore) CreateSignedURL ¶
func (o *LocalVolumeObjectStore) CreateSignedURL(bucket, key string, ttl time.Duration) (string, error)
CreateSignedURL creates a signed URL to the pod ID for anonymous external access to LocalVolumeObjectStore files. It is part of the Velero plugin interface.
func (*LocalVolumeObjectStore) DeleteObject ¶
func (o *LocalVolumeObjectStore) DeleteObject(bucket, key string) error
DeleteObject removes a files from the LocalVolumeObjectStore. It is part of the Velero plugin interface.
func (*LocalVolumeObjectStore) GetObject ¶
func (o *LocalVolumeObjectStore) GetObject(bucket, key string) (io.ReadCloser, error)
GetObject returns truthy if an object is in the LocalVolumeObjectStore. It is part of the Velero plugin interface.
func (*LocalVolumeObjectStore) Init ¶
func (o *LocalVolumeObjectStore) Init(config map[string]string) error
Init initializes the plugin. It can be called multiple times. It is part of the Velero plugin interface.
func (*LocalVolumeObjectStore) ListCommonPrefixes ¶
func (o *LocalVolumeObjectStore) ListCommonPrefixes(bucket, prefix, delimiter string) ([]string, error)
ListCommonPrefixes returns a list of subdirectories in the root of the LocalVolumeObjectStore. It is part of the Velero plugin interface.
func (*LocalVolumeObjectStore) ListObjects ¶
func (o *LocalVolumeObjectStore) ListObjects(bucket, prefix string) ([]string, error)
ListObjects returns a list of files in the LocalVolumeObjectStore. It is part of the Velero plugin interface.
func (*LocalVolumeObjectStore) ObjectExists ¶
func (o *LocalVolumeObjectStore) ObjectExists(bucket, key string) (bool, error)
ObjectExists returns truthy if an object is in the LocalVolumeObjectStore. It is part of the Velero plugin interface.
type VolumeType ¶
type VolumeType string
const ( Hostpath VolumeType = "hostpath" NFS VolumeType = "nfs" PVC VolumeType = "pvc" )