Documentation ¶
Index ¶
- func KeyAccountAccessToken(i int64) string
- func KeyFediActor(a string) string
- func KeyFediHostMeta(d string) string
- func KeyFediNodeInfo(d string) string
- func KeyInstanceOAuth(i int64) string
- func KeyMetricsDeliverError(t time.Time) string
- func KeyMetricsDeliverErrorTotal(t time.Time) string
- func KeyMetricsDeliverSuccess(t time.Time) string
- func KeyMetricsDeliverSuccessTotal(t time.Time) string
- func KeyMetricsReceived(t time.Time) string
- func KeyMetricsReceivedTotal(t time.Time) string
- func KeySession() string
- type EncryptionError
- type Error
- type KV
- type Metrics
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func KeyAccountAccessToken ¶
KeyAccountAccessToken returns the kv key which holds a user's access token.
func KeyFediActor ¶
KeyFediActor returns the kv key which holds cached actor.
func KeyFediHostMeta ¶
KeyFediHostMeta returns the kv key which holds cached host meta.
func KeyFediNodeInfo ¶
KeyFediNodeInfo returns the kv key which holds cached nodeinfo.
func KeyInstanceOAuth ¶
KeyInstanceOAuth returns the kv key which holds an instance's oauth tokens.
func KeyMetricsDeliverError ¶ added in v0.4.0
KeyMetricsDeliverError returns the kv key which holds the number of delivery errors to an instance.
func KeyMetricsDeliverErrorTotal ¶ added in v0.4.0
KeyMetricsDeliverErrorTotal returns the kv key which holds the number of delivery errors
func KeyMetricsDeliverSuccess ¶ added in v0.4.0
KeyMetricsDeliverSuccess returns the kv key which holds the number of delivery successes to an instance.
func KeyMetricsDeliverSuccessTotal ¶ added in v0.4.0
KeyMetricsDeliverSuccessTotal returns the kv key which holds the number of delivery successes to an instance.
func KeyMetricsReceived ¶ added in v0.4.0
KeyMetricsReceived returns the kv key which holds the number of receives from an instance.
func KeyMetricsReceivedTotal ¶ added in v0.4.0
KeyMetricsReceivedTotal returns the kv key which holds the number of receives.
Types ¶
type EncryptionError ¶
type EncryptionError struct {
// contains filtered or unexported fields
}
EncryptionError is returned when a an encryption error occurs.
func (*EncryptionError) Error ¶
func (e *EncryptionError) Error() string
Error returns the error message as a string.
type Error ¶
type Error error
Error represents a database specific error.
func NewEncryptionError ¶
NewEncryptionError wraps a message in an EncryptionError object.
type Metrics ¶ added in v0.4.2
type Metrics interface { IncMetricsDeliverError(ctx context.Context, instanceID int64, timestamp time.Time) Error IncMetricsDeliverErrorTotal(ctx context.Context, timestamp time.Time) Error IncMetricsDeliverSuccess(ctx context.Context, instanceID int64, timestamp time.Time) Error IncMetricsDeliverSuccessTotal(ctx context.Context, timestamp time.Time) Error IncMetricsReceived(ctx context.Context, instanceID int64, timestamp time.Time) Error IncMetricsReceivedTotal(ctx context.Context, timestamp time.Time) Error MGetMetricsDeliverError(ctx context.Context, instanceID int64, timestamps []time.Time) (map[time.Time]int, Error) MGetAllMetricsDeliverError(ctx context.Context, timestamps []time.Time) (map[int64]map[time.Time]int, Error) MGetMetricsDeliverSuccess(ctx context.Context, instanceID int64, timestamps []time.Time) (map[time.Time]int, Error) MGetAllMetricsDeliverSuccess(ctx context.Context, timestamps []time.Time) (map[int64]map[time.Time]int, Error) MGetMetricsReceived(ctx context.Context, instanceID int64, timestamps []time.Time) (map[time.Time]int, Error) MGetMetricsReceivedTotal(ctx context.Context, timestamps []time.Time) (map[time.Time]int, Error) MGetAllMetricsReceived(ctx context.Context, timestamps []time.Time) (map[int64]map[time.Time]int, Error) }