Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var (
ErrTokenWrongKind = errors.New("token is wrong kind")
)
Functions ¶
This section is empty.
Types ¶
type Block ¶ added in v0.6.0
type Block interface { AddBlock(ctx context.Context, account *models.Account, block *models.Block) error AddBlocks(ctx context.Context, account *models.Account, blocks ...*models.Block) error DeleteBlock(ctx context.Context, account *models.Account, block *models.Block) error GetBlockList(ctx context.Context) (*[]string, error) IsDomainBlocked(ctx context.Context, d string) (bool, error) ProcessBlockAdd(ctx context.Context, blockID int64) error ProcessBlockDelete(ctx context.Context, blockID int64) error ProcessBlockUpdate(ctx context.Context, blockID int64) error UpdateBlock(ctx context.Context, account *models.Account, changes []models.LogEntryBlockUpdateChange, block *models.Block) error }
type Error ¶
type Error struct {
// contains filtered or unexported fields
}
Error represents a logic specific error.
type Instance ¶ added in v0.6.0
type Instance interface { EnqueueInstanceInfoUpdates(ctx context.Context) error GetInstance(ctx context.Context, domain string) (*models.Instance, error) GetInstanceForActor(ctx context.Context, actorID *url.URL) (*models.Instance, error) GetInstanceForServerHostname(ctx context.Context, serverHostname string) (*models.Instance, error) GetInstanceSelf(ctx context.Context) (*models.Instance, error) KickInstance(ctx context.Context, instance *models.Instance, account *models.Account, admin bool) error ReadInstanceByToken(ctx context.Context, t string) (*models.Instance, error) UpdateInstanceInfo(ctx context.Context, jid string, instanceID int64) error }
type Logic ¶
type Logic interface { Account Block Instance Metrics Scheduler DeliverActivity(ctx context.Context, jid string, instanceID int64, activity fedihelper.Activity) error Domain() string GetAccountConfigMap(ctx context.Context, keys ...models.ConfigKey) (*models.AccountConfigMap, error) GetConfigMap(ctx context.Context, keys ...models.ConfigKey) (*models.ConfigMap, error) GetConfigMapForAccount(ctx context.Context, accountID int64, keys ...models.ConfigKey) (*models.ConfigMap, error) GetLoginURL(ctx context.Context, instance *models.Instance) (*url.URL, error) GetPeers(ctx context.Context) (*[]string, error) MaintDeliveryErrorTimeout(ctx context.Context, jid string) error ProcessActivity(ctx context.Context, jid string, instanceID int64, actorIRI *url.URL, activity fedihelper.Activity) error ProcessConfigChanges(ctx context.Context, configChanges []*models.ConfigChange) error SendNotification(ctx context.Context, jid string, event models.EventType, metadata map[string]interface{}) error ValidateRequest(r *http.Request, actorURI *url.URL) (bool, *fedihelper.Actor) }
type Metrics ¶ added in v0.6.0
type Metrics interface { MetricsGetAllDeliverErrorWeek(ctx context.Context, days int) (map[*models.Instance]MetricsDataPointsTime, error) MetricsGetAllDeliverSuccessWeek(ctx context.Context, days int) (map[*models.Instance]MetricsDataPointsTime, error) MetricsGetAllReceivedWeek(ctx context.Context, days int) (map[*models.Instance]MetricsDataPointsTime, error) MetricsGetDeliverErrorWeek(ctx context.Context, days int, instanceID int64) (MetricsDataPointsTime, error) MetricsGetDeliverSuccessWeek(ctx context.Context, days int, instanceID int64) (MetricsDataPointsTime, error) MetricsGetReceivedWeek(ctx context.Context, days int, instanceID int64) (MetricsDataPointsTime, error) MetricsGetReceivedTotalWeek(ctx context.Context, days int) (MetricsDataPointsTime, error) MetricsIncDeliverError(ctx context.Context, instanceID int64) MetricsIncDeliverSuccess(ctx context.Context, instanceID int64) MetricsIncReceived(ctx context.Context, instanceID int64) }
type MetricsDataPointTime ¶ added in v0.4.0
type MetricsDataPointsTime ¶ added in v0.4.0
type MetricsDataPointsTime []MetricsDataPointTime
Source Files ¶
Click to show internal directories.
Click to hide internal directories.