Documentation ¶
Index ¶
- type MockRepository
- func (r *MockRepository) CreateOrUpdate(ctx context.Context, cookie Model) (*Model, error)
- func (r *MockRepository) Delete(ctx context.Context, cookieID xid.ID) error
- func (r *MockRepository) GetByID(ctx context.Context, cookieID xid.ID) (*Model, error)
- func (r *MockRepository) ListAll(ctx context.Context) ([]*Model, error)
- type Model
- type Repository
- type SQLRepository
- func (r *SQLRepository) CreateOrUpdate(ctx context.Context, cookie Model) (*Model, error)
- func (r *SQLRepository) Delete(ctx context.Context, cookieID xid.ID) error
- func (r *SQLRepository) GetByID(ctx context.Context, cookieID xid.ID) (*Model, error)
- func (r *SQLRepository) ListAll(ctx context.Context) ([]*Model, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type MockRepository ¶
func NewMockRepository ¶
func NewMockRepository() *MockRepository
func (*MockRepository) CreateOrUpdate ¶
type Repository ¶
type Repository interface { CreateOrUpdate(ctx context.Context, cookie Model) (*Model, error) GetByID(ctx context.Context, cookieID xid.ID) (*Model, error) ListAll(ctx context.Context) ([]*Model, error) Delete(ctx context.Context, cookieID xid.ID) error }
func NewSQLRepository ¶
func NewSQLRepository(db *pgx.Conn) (Repository, error)
type SQLRepository ¶
type SQLRepository struct {
// contains filtered or unexported fields
}
func (*SQLRepository) CreateOrUpdate ¶
Click to show internal directories.
Click to hide internal directories.