Documentation ¶
Overview ¶
Package store is a generated GoMock package.
Index ¶
- Variables
- func NewSecretSetter(ds *datastore) *secretSetter
- func NewStore(db *gorm.DB) *datastore
- type IStore
- type MockIStore
- type MockIStoreMockRecorder
- type MockSecretStore
- func (m *MockSecretStore) Create(arg0 context.Context, arg1 *model.SecretM) error
- func (m *MockSecretStore) Delete(arg0 context.Context, arg1, arg2 string) error
- func (m *MockSecretStore) EXPECT() *MockSecretStoreMockRecorder
- func (m *MockSecretStore) Get(arg0 context.Context, arg1, arg2 string) (*model.SecretM, error)
- func (m *MockSecretStore) List(arg0 context.Context, arg1 string, arg2 ...meta.ListOption) (int64, []*model.SecretM, error)
- func (m *MockSecretStore) Update(arg0 context.Context, arg1 *model.SecretM) error
- type MockSecretStoreMockRecorder
- func (mr *MockSecretStoreMockRecorder) Create(arg0, arg1 any) *gomock.Call
- func (mr *MockSecretStoreMockRecorder) Delete(arg0, arg1, arg2 any) *gomock.Call
- func (mr *MockSecretStoreMockRecorder) Get(arg0, arg1, arg2 any) *gomock.Call
- func (mr *MockSecretStoreMockRecorder) List(arg0, arg1 any, arg2 ...any) *gomock.Call
- func (mr *MockSecretStoreMockRecorder) Update(arg0, arg1 any) *gomock.Call
- type MockUserStore
- func (m *MockUserStore) Create(arg0 context.Context, arg1 *model.UserM) error
- func (m *MockUserStore) Delete(arg0 context.Context, arg1 map[string]any) error
- func (m *MockUserStore) EXPECT() *MockUserStoreMockRecorder
- func (m *MockUserStore) Fetch(arg0 context.Context, arg1 map[string]any) (*model.UserM, error)
- func (m *MockUserStore) Get(arg0 context.Context, arg1, arg2 string) (*model.UserM, error)
- func (m *MockUserStore) GetByUsername(arg0 context.Context, arg1 string) (*model.UserM, error)
- func (m *MockUserStore) List(arg0 context.Context, arg1 ...meta.ListOption) (int64, []*model.UserM, error)
- func (m *MockUserStore) Update(arg0 context.Context, arg1 *model.UserM) error
- type MockUserStoreMockRecorder
- func (mr *MockUserStoreMockRecorder) Create(arg0, arg1 any) *gomock.Call
- func (mr *MockUserStoreMockRecorder) Delete(arg0, arg1 any) *gomock.Call
- func (mr *MockUserStoreMockRecorder) Fetch(arg0, arg1 any) *gomock.Call
- func (mr *MockUserStoreMockRecorder) Get(arg0, arg1, arg2 any) *gomock.Call
- func (mr *MockUserStoreMockRecorder) GetByUsername(arg0, arg1 any) *gomock.Call
- func (mr *MockUserStoreMockRecorder) List(arg0 any, arg1 ...any) *gomock.Call
- func (mr *MockUserStoreMockRecorder) Update(arg0, arg1 any) *gomock.Call
- type SecretExpansion
- type SecretStore
- type UserExpansion
- type UserStore
Constants ¶
This section is empty.
Variables ¶
ProviderSet is a Wire provider set that initializes new datastore instances and binds the IStore interface to the actual datastore type.
var (
S *datastore
)
Singleton instance variables.
var (
SetterProviderSet = wire.NewSet(NewSecretSetter, wire.Bind(new(auth.TemporarySecretSetter), new(*secretSetter)))
)
Functions ¶
func NewSecretSetter ¶
func NewSecretSetter(ds *datastore) *secretSetter
NewSecretSetter initializes a new secretSetter instance using the provided datastore.
Types ¶
type IStore ¶
type IStore interface { DB(ctx context.Context) *gorm.DB TX(context.Context, func(ctx context.Context) error) error Users() UserStore Secrets() SecretStore }
IStore is an interface that represents methods required to be implemented by a Store implementation.
type MockIStore ¶
type MockIStore struct {
// contains filtered or unexported fields
}
MockIStore is a mock of IStore interface.
func NewMockIStore ¶
func NewMockIStore(ctrl *gomock.Controller) *MockIStore
NewMockIStore creates a new mock instance.
func (*MockIStore) EXPECT ¶
func (m *MockIStore) EXPECT() *MockIStoreMockRecorder
EXPECT returns an object that allows the caller to indicate expected use.
type MockIStoreMockRecorder ¶
type MockIStoreMockRecorder struct {
// contains filtered or unexported fields
}
MockIStoreMockRecorder is the mock recorder for MockIStore.
func (*MockIStoreMockRecorder) Secrets ¶
func (mr *MockIStoreMockRecorder) Secrets() *gomock.Call
Secrets indicates an expected call of Secrets.
func (*MockIStoreMockRecorder) TX ¶
func (mr *MockIStoreMockRecorder) TX(arg0, arg1 any) *gomock.Call
TX indicates an expected call of TX.
func (*MockIStoreMockRecorder) Users ¶
func (mr *MockIStoreMockRecorder) Users() *gomock.Call
Users indicates an expected call of Users.
type MockSecretStore ¶
type MockSecretStore struct {
// contains filtered or unexported fields
}
MockSecretStore is a mock of SecretStore interface.
func NewMockSecretStore ¶
func NewMockSecretStore(ctrl *gomock.Controller) *MockSecretStore
NewMockSecretStore creates a new mock instance.
func (*MockSecretStore) Delete ¶
func (m *MockSecretStore) Delete(arg0 context.Context, arg1, arg2 string) error
Delete mocks base method.
func (*MockSecretStore) EXPECT ¶
func (m *MockSecretStore) EXPECT() *MockSecretStoreMockRecorder
EXPECT returns an object that allows the caller to indicate expected use.
type MockSecretStoreMockRecorder ¶
type MockSecretStoreMockRecorder struct {
// contains filtered or unexported fields
}
MockSecretStoreMockRecorder is the mock recorder for MockSecretStore.
func (*MockSecretStoreMockRecorder) Create ¶
func (mr *MockSecretStoreMockRecorder) Create(arg0, arg1 any) *gomock.Call
Create indicates an expected call of Create.
func (*MockSecretStoreMockRecorder) Delete ¶
func (mr *MockSecretStoreMockRecorder) Delete(arg0, arg1, arg2 any) *gomock.Call
Delete indicates an expected call of Delete.
func (*MockSecretStoreMockRecorder) Get ¶
func (mr *MockSecretStoreMockRecorder) Get(arg0, arg1, arg2 any) *gomock.Call
Get indicates an expected call of Get.
type MockUserStore ¶
type MockUserStore struct {
// contains filtered or unexported fields
}
MockUserStore is a mock of UserStore interface.
func NewMockUserStore ¶
func NewMockUserStore(ctrl *gomock.Controller) *MockUserStore
NewMockUserStore creates a new mock instance.
func (*MockUserStore) EXPECT ¶
func (m *MockUserStore) EXPECT() *MockUserStoreMockRecorder
EXPECT returns an object that allows the caller to indicate expected use.
func (*MockUserStore) GetByUsername ¶
GetByUsername mocks base method.
type MockUserStoreMockRecorder ¶
type MockUserStoreMockRecorder struct {
// contains filtered or unexported fields
}
MockUserStoreMockRecorder is the mock recorder for MockUserStore.
func (*MockUserStoreMockRecorder) Create ¶
func (mr *MockUserStoreMockRecorder) Create(arg0, arg1 any) *gomock.Call
Create indicates an expected call of Create.
func (*MockUserStoreMockRecorder) Delete ¶
func (mr *MockUserStoreMockRecorder) Delete(arg0, arg1 any) *gomock.Call
Delete indicates an expected call of Delete.
func (*MockUserStoreMockRecorder) Fetch ¶
func (mr *MockUserStoreMockRecorder) Fetch(arg0, arg1 any) *gomock.Call
Fetch indicates an expected call of Fetch.
func (*MockUserStoreMockRecorder) Get ¶
func (mr *MockUserStoreMockRecorder) Get(arg0, arg1, arg2 any) *gomock.Call
Get indicates an expected call of Get.
func (*MockUserStoreMockRecorder) GetByUsername ¶
func (mr *MockUserStoreMockRecorder) GetByUsername(arg0, arg1 any) *gomock.Call
GetByUsername indicates an expected call of GetByUsername.
type SecretExpansion ¶
type SecretExpansion interface{}
SecretExpansion defines additional methods for secret operations.
type SecretStore ¶
type SecretStore interface { // Create inserts a new secret into the database. Create(ctx context.Context, secret *model.SecretM) error // Update modifies an existing secret in the database. Update(ctx context.Context, secret *model.SecretM) error // Delete removes secrets with the specified options. Delete(ctx context.Context, opts *where.WhereOptions) error // Get retrieves a secret with the specified options. Get(ctx context.Context, opts *where.WhereOptions) (*model.SecretM, error) // List returns a list of secrets with the specified options. List(ctx context.Context, opts *where.WhereOptions) (int64, []*model.SecretM, error) SecretExpansion }
SecretStore defines the interface for managing secrets in the database.
type UserExpansion ¶
type UserExpansion interface{}
UserExpansion defines additional methods for user operations.
type UserStore ¶
type UserStore interface { // Create inserts a new user into the database. Create(ctx context.Context, user *model.UserM) error // Update modifies an existing user in the database. Update(ctx context.Context, user *model.UserM) error // Delete removes users with the specified options. Delete(ctx context.Context, opts *where.WhereOptions) error // Get retrieves a user with the specified options. Get(ctx context.Context, opts *where.WhereOptions) (*model.UserM, error) // List returns a list of users with the specified options. List(ctx context.Context, opts *where.WhereOptions) (int64, []*model.UserM, error) UserExpansion }
UserStore defines the interface for managing users in the database.