Documentation ¶
Index ¶
- Constants
- type Config
- type Link
- type Logic
- func (l *Logic) CountInstances(ctx context.Context) (int64, error)
- func (l *Logic) CountTags(ctx context.Context) (int64, error)
- func (l *Logic) CreateInstance(ctx context.Context, instance *models.Instance) error
- func (l *Logic) CreateTag(ctx context.Context, tag *models.Tag) error
- func (l *Logic) GetLoginURL(ctx context.Context, instance *models.Instance) (*url.URL, error)
- func (l *Logic) GetOrCreateInstance(ctx context.Context, domain string) (*models.Instance, error)
- func (l *Logic) MastodonOauth(r *http.Request, instance *models.Instance) (*models.Account, int, error)
- func (l *Logic) NewInstanceFromDomain(ctx context.Context, domain string) (*models.Instance, error)
- func (l *Logic) ReadAccount(ctx context.Context, id int64) (*models.Account, error)
- func (l *Logic) ReadAccountByUsername(ctx context.Context, username string, instanceID int64) (*models.Account, error)
- func (l *Logic) ReadInstance(ctx context.Context, id int64) (*models.Instance, error)
- func (l *Logic) ReadInstanceByDomain(ctx context.Context, domain string) (*models.Instance, error)
- func (l *Logic) ReadInstanceByToken(ctx context.Context, t string) (*models.Instance, error)
- func (l *Logic) ReadInstancesPage(ctx context.Context, index, count int) ([]*models.Instance, error)
- func (l *Logic) ReadTagByName(ctx context.Context, name string) (*models.Tag, error)
- func (l *Logic) ReadTagsPage(ctx context.Context, index, count int) ([]*models.Tag, error)
Constants ¶
View Source
const InstanceHostnameCache = 60 * 60 // 1 hour
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Link ¶
type Link struct { Href string `json:"href,omitempty"` Rel string `json:"rel,omitempty" xml:"rel,attr"` Template string `json:"template,omitempty" xml:"template,attr"` Type string `json:"type,omitempty"` }
Link represents a link.
type Logic ¶
type Logic struct {
// contains filtered or unexported fields
}
func (*Logic) CreateInstance ¶
func (*Logic) GetLoginURL ¶
func (*Logic) GetOrCreateInstance ¶
func (*Logic) MastodonOauth ¶
func (*Logic) NewInstanceFromDomain ¶
func (*Logic) ReadAccount ¶
func (*Logic) ReadAccountByUsername ¶
func (*Logic) ReadInstance ¶
func (*Logic) ReadInstanceByDomain ¶
func (*Logic) ReadInstanceByToken ¶
func (*Logic) ReadInstancesPage ¶
func (*Logic) ReadTagByName ¶
Click to show internal directories.
Click to hide internal directories.