Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Factory ¶
type Factory interface { Users() UserStore //store 仓库 即db有关的接口 Secret() SecretStore Policy() PolicyStore Close() error }
Factory 选项
type PolicyStore ¶
type PolicyStore interface { Create(ctx context.Context, policy *v1.Policy, opts metav1.CreateOptions) error Update(ctx context.Context, policy *v1.Policy, opts metav1.UpdateOptions) error Delete(ctx context.Context, username string, name string, opts metav1.DeleteOptions) error DeleteCollection(ctx context.Context, username string, names []string, opts metav1.DeleteOptions) error Get(ctx context.Context, username string, name string, opts metav1.GetOptions) (*v1.Policy, error) List(ctx context.Context, username string, opts metav1.ListOptions) (*v1.PolicyList, error) }
type SecretStore ¶
type SecretStore interface { Create(ctx context.Context, secret *v1.Secret, opts metav1.CreateOptions) error Update(ctx context.Context, secret *v1.Secret, opts metav1.UpdateOptions) error Delete(ctx context.Context, username, secretID string, opts metav1.DeleteOptions) error DeleteCollection(ctx context.Context, username string, secretIDs []string, opts metav1.DeleteOptions) error Get(ctx context.Context, username, name string, opts metav1.GetOptions) (*v1.Secret, error) List(ctx context.Context, username string, opts metav1.ListOptions) (*v1.SecretList, error) }
type UserStore ¶
type UserStore interface { Create(ctx context.Context, user *v1.User, opts metav1.CreateOptions) error Update(ctx context.Context, user *v1.User, opts metav1.UpdateOptions) error Delete(ctx context.Context, username string, opts metav1.DeleteOptions) error DeleteCollection(ctx context.Context, usernames []string, opts metav1.DeleteOptions) error //删除集合 Get(ctx context.Context, username string, opts metav1.GetOptions) (*v1.User, error) List(ctx context.Context, opts metav1.ListOptions) (*v1.UserList, error) }
Click to show internal directories.
Click to hide internal directories.