Documentation ¶
Index ¶
- Constants
- func VisibilityList() []string
- type Mastodon
- func (cfg *Mastodon) AppName() string
- func (cfg *Mastodon) Export(path string) error
- func (cfg *Mastodon) Logger() *zap.Logger
- func (cfg *Mastodon) PostMessage(ctx context.Context, msg *Message) (string, error)
- func (cfg *Mastodon) Profile(ctx context.Context) (*mstdn.Account, error)
- func (cfg *Mastodon) Registory() string
- func (cfg *Mastodon) Scopes() string
- func (cfg *Mastodon) Servername() string
- func (cfg *Mastodon) ShowProfile(ctx context.Context, jsonFlag bool, w io.Writer) error
- type Message
- type Visibility
Constants ¶
View Source
const ( VisibilityUnknown = iota VisibilityPublic VisibilityUnlisted VisibilityFollowersOnly VisibilityDirectMessage )
Variables ¶
This section is empty.
Functions ¶
func VisibilityList ¶
func VisibilityList() []string
VisibilityList function returns list of Visibility strings.
Types ¶
type Mastodon ¶
type Mastodon struct { Server string `json:"server"` ClientID string `json:"client_id"` ClientSecret string `json:"client_secret"` AccessToken string `json:"access_token"` // contains filtered or unexported fields }
Mastodon is configuration for Mastodon
func Register ¶
func Register(ctx context.Context, server, userId, password string, logger *log.ZapEventLogger) (*Mastodon, error)
Register functions registers application to mastodon server.
func (*Mastodon) PostMessage ¶
PostMessage method posts message and image files to Mastodon.
func (*Mastodon) Servername ¶
type Visibility ¶
type Visibility int
func DefaultVisibility ¶
func DefaultVisibility() Visibility
DefaultVisibility returns default Visibility.
func GetVisibilityFrom ¶
func GetVisibilityFrom(s string) Visibility
GetVisibilityFrom function returns Visibility from string.
func (Visibility) String ¶
func (v Visibility) String() string
Click to show internal directories.
Click to hide internal directories.