Documentation ¶
Index ¶
Constants ¶
View Source
const ( // SoftwareMastodon is the software keyword for Mastodon. SoftwareMastodon = "mastodon" // SoftwarePleroma is the software keyword for Pleroma. SoftwarePleroma = "pleroma" )
Variables ¶
View Source
var (
ErrTokenWrongKind = errors.New("token is wrong kind")
)
Functions ¶
This section is empty.
Types ¶
type Error ¶
type Error struct {
// contains filtered or unexported fields
}
Error represents a fedihelper specific error.
type Logic ¶
type Logic interface { ReadAccount(ctx context.Context, id int64) (*models.Account, error) ReadAccountByUsername(ctx context.Context, username string, instanceID int64) (*models.Account, error) CountInstances(ctx context.Context) (int64, error) CreateInstance(ctx context.Context, instance *models.Instance) error GetLoginURL(ctx context.Context, instance *models.Instance) (*url.URL, error) GetOrCreateInstance(ctx context.Context, domain string) (*models.Instance, error) NewInstanceFromDomain(ctx context.Context, domain string) (*models.Instance, error) ReadInstance(ctx context.Context, id int64) (*models.Instance, error) ReadInstanceByDomain(ctx context.Context, domain string) (*models.Instance, error) ReadInstanceByToken(ctx context.Context, token string) (*models.Instance, error) ReadInstancesPage(ctx context.Context, index, count int) ([]*models.Instance, error) MastodonOauth(r *http.Request, instance *models.Instance) (*models.Account, int, error) CountTags(ctx context.Context) (int64, error) CreateTag(ctx context.Context, tag *models.Tag) error ReadTagByName(ctx context.Context, name string) (*models.Tag, error) ReadTagsPage(ctx context.Context, index, count int) ([]*models.Tag, error) }
type NoHelperError ¶
type NoHelperError struct {
// contains filtered or unexported fields
}
NoHelperError represents a missing helper error.
func NewNoHelperError ¶
func NewNoHelperError(software string) *NoHelperError
NewNoHelperError wraps a message in a NoHelperError object.
func (*NoHelperError) Error ¶
func (e *NoHelperError) Error() string
Error returns the error message as a string.
Click to show internal directories.
Click to hide internal directories.