Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ErrNotImplemented = errors.New("not implemented")
Functions ¶
func RegisterProvider ¶
RegisterProvider registers a storage.Factory by name. This is expected to happen during app startup.
Types ¶
type CertificateStore ¶
type CertificateStore interface { Get(name string) (*x509.Certificate, *rsa.PrivateKey, error) Create(name string, crt *x509.Certificate, key *rsa.PrivateKey) error Delete(name string) error }
type ClusterStore ¶
type CredentialStore ¶
type CredentialStore interface { List(opts metav1.ListOptions) ([]*cloudapi.Credential, error) Get(name string) (*cloudapi.Credential, error) Create(obj *cloudapi.Credential) (*cloudapi.Credential, error) Update(obj *cloudapi.Credential) (*cloudapi.Credential, error) Delete(name string) error }
type Factory ¶
type Factory func(cfg *api.PharmerConfig) (Interface, error)
Factory is a function that returns a storage.Interface. The config parameter provides an io.Reader handler to the factory in order to load specific configurations. If no configuration is provided the parameter is nil.
type Interface ¶
type Interface interface { Owner(int64) ResourceInterface ResourceInterface }
func NewStoreInterface ¶
func NewStoreInterface(cfg *api.PharmerConfig) (Interface, error)
type MachineSetStore ¶
type MachineSetStore interface { List(opts metav1.ListOptions) ([]*clusterv1.MachineSet, error) Get(name string) (*clusterv1.MachineSet, error) Create(obj *clusterv1.MachineSet) (*clusterv1.MachineSet, error) Update(obj *clusterv1.MachineSet) (*clusterv1.MachineSet, error) Delete(name string) error UpdateStatus(obj *clusterv1.MachineSet) (*clusterv1.MachineSet, error) }
type MachineStore ¶
type MachineStore interface { List(opts metav1.ListOptions) ([]*clusterv1.Machine, error) Get(name string) (*clusterv1.Machine, error) Create(obj *clusterv1.Machine) (*clusterv1.Machine, error) Update(obj *clusterv1.Machine) (*clusterv1.Machine, error) Delete(name string) error UpdateStatus(obj *clusterv1.Machine) (*clusterv1.Machine, error) }
type OperationStore ¶
type ResourceInterface ¶
type ResourceInterface interface { Credentials() CredentialStore Operations() OperationStore Clusters() ClusterStore Machine(cluster string) MachineStore MachineSet(cluster string) MachineSetStore Certificates(cluster string) CertificateStore SSHKeys(cluster string) SSHKeyStore }
func GetStoreProvider ¶
func GetStoreProvider(cmd *cobra.Command) (ResourceInterface, error)
func NewStoreProvider ¶
func NewStoreProvider(cfg *api.PharmerConfig) (ResourceInterface, error)
Click to show internal directories.
Click to hide internal directories.