Documentation ¶
Index ¶
- func NewDefaultBackend(projectID string, apiToken string) Backend
- func NewS3Backend(projectID string, bucket string, region string, accessKeyID string, ...) Backend
- type DefaultBackend
- func (b *DefaultBackend) Bind(planID string, userID string) error
- func (b *DefaultBackend) Decrement(featureID string, userID string, value int) error
- func (b *DefaultBackend) Feature(featureID string, userID string) bool
- func (b *DefaultBackend) FeatureMatrix() (*FeatureMatrix, error)
- func (b *DefaultBackend) Increment(featureID string, userID string, value int) error
- func (b *DefaultBackend) Set(featureID string, userID string, value int) error
- func (b *DefaultBackend) Usage(userID string) (*FeatureUsage, error)
- type FeatureResp
- type S3Backend
- func (b *S3Backend) Bind(planID string, userID string) error
- func (b *S3Backend) Decrement(featureID string, userID string, value int) error
- func (b *S3Backend) Feature(featureID string, userID string) bool
- func (b *S3Backend) FeatureMatrix() (*FeatureMatrix, error)
- func (b *S3Backend) Increment(featureID string, userID string, value int) error
- func (b *S3Backend) Set(featureID string, userID string, value int) error
- func (b *S3Backend) Usage(userID string) (*FeatureUsage, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewDefaultBackend ¶
NewDefaultBackend initializes the S3 Backend
Types ¶
type DefaultBackend ¶
func (*DefaultBackend) Bind ¶ added in v0.3.0
func (b *DefaultBackend) Bind(planID string, userID string) error
func (*DefaultBackend) Decrement ¶
func (b *DefaultBackend) Decrement(featureID string, userID string, value int) error
func (*DefaultBackend) Feature ¶
func (b *DefaultBackend) Feature(featureID string, userID string) bool
func (*DefaultBackend) FeatureMatrix ¶
func (b *DefaultBackend) FeatureMatrix() (*FeatureMatrix, error)
func (*DefaultBackend) Increment ¶
func (b *DefaultBackend) Increment(featureID string, userID string, value int) error
func (*DefaultBackend) Set ¶
func (b *DefaultBackend) Set(featureID string, userID string, value int) error
func (*DefaultBackend) Usage ¶
func (b *DefaultBackend) Usage(userID string) (*FeatureUsage, error)
type FeatureResp ¶
Click to show internal directories.
Click to hide internal directories.