Documentation ¶
Index ¶
- Constants
- func AddPost(c *cli.Context, id, token string) error
- func ClaimPosts(c *cli.Context, localPosts *[]Post) (*[]writeas.ClaimPostResult, error)
- func CmdPull(c *cli.Context) error
- func ComposeNewPost() (string, *[]byte)
- func DoDelete(c *cli.Context, friendlyID, token string) error
- func DoFetch(c *cli.Context, friendlyID string) error
- func DoFetchPosts(c *cli.Context) ([]writeas.Post, error)
- func DoLogIn(c *cli.Context, username, password string) error
- func DoLogOut(c *cli.Context) error
- func DoPost(c *cli.Context, post []byte, font string, encrypt, code bool) (*writeas.Post, error)
- func DoUpdate(c *cli.Context, post []byte, friendlyID, token, font string, code bool) error
- func GetPosts(c *cli.Context) *[]Post
- func HostURL(c *cli.Context) string
- func ReadStdIn() []byte
- func RemovePost(c *cli.Context, id string)
- func TokenFromID(c *cli.Context, id string) string
- func WritePost(postsDir string, p *writeas.Post) error
- type Post
- type RemoteColl
- type RemotePost
Constants ¶
View Source
const (
PostFileExt = ".txt"
)
Variables ¶
This section is empty.
Functions ¶
func ClaimPosts ¶
ClaimPost adds a local post to the authenticated user's account and deletes the local reference
func ComposeNewPost ¶
func DoFetch ¶
DoFetch retrieves the Write.as post with the given friendlyID, optionally via the Tor hidden service.
func DoFetchPosts ¶
DoFetchPosts retrieves all remote posts for the authenticated user
func RemovePost ¶
Types ¶
type RemoteColl ¶
RemoteColl represents a collection of posts It is a reduced set of data from a go-writeas Collection
func DoFetchCollections ¶
func DoFetchCollections(c *cli.Context) ([]RemoteColl, error)
DoFetchCollections retrieves a list of the currently logged in users collections.
type RemotePost ¶
type RemotePost struct { Post Title, Excerpt, Slug, Collection, EditToken string Synced bool Updated time.Time }
RemotePost holds addition information about published posts
func GetUserPosts ¶
func GetUserPosts(c *cli.Context, draftsOnly bool) ([]RemotePost, error)
Click to show internal directories.
Click to hide internal directories.