mirror of
https://github.com/superseriousbusiness/gotosocial.git
synced 2025-10-29 13:22:25 -05:00
[chore/bugfix] Domain block tidying up, Implement first pass of 207 Multi-Status (#1886)
* [chore/refactor] update domain block processing * expose domain block import errors a lil better * move/remove unused query keys
This commit is contained in:
parent
d9c69f6ce0
commit
e70bf8a6c8
19 changed files with 969 additions and 380 deletions
|
|
@ -26,13 +26,19 @@ import (
|
|||
|
||||
// Domain contains DB functions related to domains and domain blocks.
|
||||
type Domain interface {
|
||||
// CreateDomainBlock ...
|
||||
// CreateDomainBlock puts the given instance-level domain block into the database.
|
||||
CreateDomainBlock(ctx context.Context, block *gtsmodel.DomainBlock) Error
|
||||
|
||||
// GetDomainBlock ...
|
||||
// GetDomainBlock returns one instance-level domain block with the given domain, if it exists.
|
||||
GetDomainBlock(ctx context.Context, domain string) (*gtsmodel.DomainBlock, Error)
|
||||
|
||||
// DeleteDomainBlock ...
|
||||
// GetDomainBlockByID returns one instance-level domain block with the given id, if it exists.
|
||||
GetDomainBlockByID(ctx context.Context, id string) (*gtsmodel.DomainBlock, Error)
|
||||
|
||||
// GetDomainBlocks returns all instance-level domain blocks currently enforced by this instance.
|
||||
GetDomainBlocks(ctx context.Context) ([]*gtsmodel.DomainBlock, error)
|
||||
|
||||
// DeleteDomainBlock deletes an instance-level domain block with the given domain, if it exists.
|
||||
DeleteDomainBlock(ctx context.Context, domain string) Error
|
||||
|
||||
// IsDomainBlocked checks if an instance-level domain block exists for the given domain string (eg., `example.org`).
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue