Documentation ¶
Index ¶
- type EndpointStore
- func (es *EndpointStore) AllForUser(ctx context.Context, userId string) ([]*models.Endpoint, error)
- func (es *EndpointStore) Delete(ctx context.Context, endpoint *models.Endpoint, userId string) error
- func (es *EndpointStore) ExistsByOriginal(ctx context.Context, endpoint *models.Endpoint, userId string) (bool, error)
- func (es *EndpointStore) ExistsByThrottlr(ctx context.Context, endpoint *models.Endpoint, userId string) (bool, error)
- func (es *EndpointStore) Fill(ctx context.Context, endpoint *models.Endpoint, userId string) error
- func (es *EndpointStore) Get(ctx context.Context, throttlrPath, userId string) (*models.Endpoint, error)
- func (es *EndpointStore) Store(ctx context.Context, e *models.Endpoint, userId string) (int, error)
- func (es *EndpointStore) Update(ctx context.Context, endpoint *models.Endpoint, userId string) error
- func (es *EndpointStore) UpdateBucketCount(ctx context.Context, endpoint *models.Endpoint, userId string) error
- func (es *EndpointStore) UpdateWindowOpenedAt(ctx context.Context, endpoint *models.Endpoint, userId string) error
- type KeyStore
- type UserStore
- func (us *UserStore) ById(ctx context.Context, id string) (*models.User, error)
- func (us *UserStore) Delete(ctx context.Context, id string) error
- func (us *UserStore) RegenerateApiKey(ctx context.Context, u models.User) (uuid.UUID, error)
- func (us *UserStore) Store(ctx context.Context, u models.User) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type EndpointStore ¶
type EndpointStore struct {
// contains filtered or unexported fields
}
func NewEndpointStore ¶
func NewEndpointStore(db *pgxpool.Pool, l *slog.Logger) *EndpointStore
func (*EndpointStore) AllForUser ¶
func (*EndpointStore) ExistsByOriginal ¶
func (*EndpointStore) ExistsByThrottlr ¶
func (*EndpointStore) UpdateBucketCount ¶
func (*EndpointStore) UpdateWindowOpenedAt ¶
type KeyStore ¶
type KeyStore struct {
// contains filtered or unexported fields
}
func NewKeyStore ¶
func (*KeyStore) UserIdFromKey ¶
type UserStore ¶
type UserStore struct {
// contains filtered or unexported fields
}
func NewUserStore ¶
func (*UserStore) RegenerateApiKey ¶
Click to show internal directories.
Click to hide internal directories.