Documentation ¶
Index ¶
- type Logic
- func (l *Logic) AddBlock(ctx context.Context, account *models.Account, block *models.Block) error
- func (l *Logic) AddBlocks(ctx context.Context, account *models.Account, blocks ...*models.Block) error
- func (l *Logic) DeleteBlock(ctx context.Context, account *models.Account, block *models.Block) error
- func (l *Logic) DeliverActivity(ctx context.Context, jid string, instanceID int64, ...) error
- func (l *Logic) Domain() string
- func (l *Logic) GetAccountConfigMap(ctx context.Context, keys ...models.ConfigKey) (*models.AccountConfigMap, error)
- func (l *Logic) GetBlockList(ctx context.Context) (*[]string, error)
- func (l *Logic) GetConfigMap(ctx context.Context, keys ...models.ConfigKey) (*models.ConfigMap, error)
- func (l *Logic) GetConfigMapForAccount(ctx context.Context, accountID int64, keys ...models.ConfigKey) (*models.ConfigMap, error)
- func (l *Logic) GetInstance(ctx context.Context, domain string) (*models.Instance, error)
- func (l *Logic) GetInstanceForActor(ctx context.Context, actorID *url.URL) (*models.Instance, error)
- func (l *Logic) GetInstanceForServerHostname(ctx context.Context, serverHostname string) (*models.Instance, error)
- func (l *Logic) GetInstanceSelf(ctx context.Context) (*models.Instance, error)
- func (l *Logic) GetInstancesForForwarding(ctx context.Context, actorIRI, objectID string) ([]*models.Instance, error)
- func (l *Logic) GetLoginURL(ctx context.Context, instance *models.Instance) (*url.URL, error)
- func (l *Logic) GetPeers(ctx context.Context) (*[]string, error)
- func (l *Logic) IsDomainBlocked(ctx context.Context, d string) (bool, error)
- func (l *Logic) MetricsGetAllDeliverErrorWeek(ctx context.Context) (map[*models.Instance]logic.MetricsDataPointsTime, error)
- func (l *Logic) MetricsGetAllDeliverSuccessWeek(ctx context.Context) (map[*models.Instance]logic.MetricsDataPointsTime, error)
- func (l *Logic) MetricsGetAllReceivedWeek(ctx context.Context) (map[*models.Instance]logic.MetricsDataPointsTime, error)
- func (l *Logic) MetricsGetDeliverErrorWeek(ctx context.Context, instanceID int64) (*logic.MetricsDataPointsTime, error)
- func (l *Logic) MetricsGetDeliverSuccessWeek(ctx context.Context, instanceID int64) (*logic.MetricsDataPointsTime, error)
- func (l *Logic) MetricsGetReceivedTotalWeek(ctx context.Context) (*logic.MetricsDataPointsTime, error)
- func (l *Logic) MetricsGetReceivedWeek(ctx context.Context, instanceID int64) (*logic.MetricsDataPointsTime, error)
- func (l *Logic) MetricsIncDeliverError(ctx context.Context, instanceID int64)
- func (l *Logic) MetricsIncDeliverSuccess(ctx context.Context, instanceID int64)
- func (l *Logic) MetricsIncReceived(ctx context.Context, instanceID int64)
- func (l *Logic) ProcessActivity(ctx context.Context, jid string, instanceID int64, actorIRI *url.URL, ...) error
- func (l *Logic) ProcessBlockAdd(ctx context.Context, blockID int64) error
- func (l *Logic) ProcessBlockDelete(ctx context.Context, blockID int64) error
- func (l *Logic) ProcessBlockUpdate(ctx context.Context, blockID int64) error
- func (l *Logic) ProcessConfigChanges(ctx context.Context, configChanges []*models.ConfigChange) error
- func (l *Logic) SendNotification(ctx context.Context, jid string, event models.EventType, ...) error
- func (l *Logic) SetFedi(f *fedi.Module)
- func (l *Logic) SetNotifier(n notification.Notifier)
- func (l *Logic) SetRunner(r runner.Runner)
- func (l *Logic) Transport() *fedihelper.Transport
- func (l *Logic) UpdateBlock(ctx context.Context, account *models.Account, ...) error
- func (l *Logic) ValidateRequest(r *nethttp.Request, actorURI *url.URL) (bool, *fedihelper.Actor)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Logic ¶
type Logic struct {
// contains filtered or unexported fields
}
Logic contains shared logic for the application
func New ¶
func New(ctx context.Context, c pub.Clock, d db.DB, h *ihttp.Client, k kv.KV, tokz *token.Tokenizer) (*Logic, error)
New created a new logic module
func (*Logic) DeleteBlock ¶
func (*Logic) DeliverActivity ¶
func (*Logic) GetAccountConfigMap ¶ added in v0.2.0
func (*Logic) GetBlockList ¶
GetBlockList returns a list of blocked domains
func (*Logic) GetConfigMap ¶
func (*Logic) GetConfigMapForAccount ¶ added in v0.2.0
func (*Logic) GetInstance ¶
func (*Logic) GetInstanceForActor ¶
func (*Logic) GetInstanceForServerHostname ¶
func (*Logic) GetInstanceSelf ¶
func (*Logic) GetInstancesForForwarding ¶
func (*Logic) GetLoginURL ¶
func (*Logic) IsDomainBlocked ¶
IsDomainBlocked returns true if a domain matches a block in the database
func (*Logic) MetricsGetAllDeliverErrorWeek ¶ added in v0.4.2
func (*Logic) MetricsGetAllDeliverSuccessWeek ¶ added in v0.4.2
func (*Logic) MetricsGetAllReceivedWeek ¶ added in v0.4.2
func (*Logic) MetricsGetDeliverErrorWeek ¶ added in v0.4.0
func (*Logic) MetricsGetDeliverSuccessWeek ¶ added in v0.4.0
func (*Logic) MetricsGetReceivedTotalWeek ¶ added in v0.4.1
func (*Logic) MetricsGetReceivedWeek ¶ added in v0.4.0
func (*Logic) MetricsIncDeliverError ¶ added in v0.4.0
func (*Logic) MetricsIncDeliverSuccess ¶ added in v0.4.0
func (*Logic) MetricsIncReceived ¶ added in v0.4.0
func (*Logic) ProcessActivity ¶
func (*Logic) ProcessBlockAdd ¶
func (*Logic) ProcessBlockDelete ¶
func (*Logic) ProcessBlockUpdate ¶
func (*Logic) ProcessConfigChanges ¶
func (*Logic) SendNotification ¶ added in v0.2.0
func (*Logic) SetNotifier ¶ added in v0.2.0
func (l *Logic) SetNotifier(n notification.Notifier)
func (*Logic) Transport ¶
func (l *Logic) Transport() *fedihelper.Transport
func (*Logic) UpdateBlock ¶
func (*Logic) ValidateRequest ¶
Click to show internal directories.
Click to hide internal directories.