Documentation ¶
Index ¶
- type Helper
- func (h *Helper) GetAccessToken(ctx context.Context, instance *models.FediInstance, code string) (accessToken string, err error)
- func (h *Helper) GetCurrentAccount(ctx context.Context, instance *models.FediInstance, accessToken string) (*models.FediAccount, error)
- func (h *Helper) MakeLoginURL(_ context.Context, instance *models.FediInstance) (*url.URL, error)
- func (h *Helper) RegisterApp(ctx context.Context, instance *models.FediInstance) (string, string, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Helper ¶
type Helper struct {
// contains filtered or unexported fields
}
Helper is a mastodon helper
func (*Helper) GetAccessToken ¶
func (h *Helper) GetAccessToken(ctx context.Context, instance *models.FediInstance, code string) (accessToken string, err error)
GetAccessToken gets an access token for a account from a returned code
func (*Helper) GetCurrentAccount ¶
func (h *Helper) GetCurrentAccount(ctx context.Context, instance *models.FediInstance, accessToken string) (*models.FediAccount, error)
GetCurrentAccount retrieves the current federated account
func (*Helper) MakeLoginURL ¶
MakeLoginURL creates a login redirect url for mastodon
func (*Helper) RegisterApp ¶
func (h *Helper) RegisterApp(ctx context.Context, instance *models.FediInstance) (string, string, error)
RegisterApp registers feditools with mastodon and returns the client id and client secret.
Click to show internal directories.
Click to hide internal directories.