Documentation ¶
Index ¶
- type Comment
- type Folder
- type Group
- type ID
- type Kibela
- func (ki *Kibela) GetComment(ctx context.Context, num int) (*Comment, error)
- func (ki *Kibela) GetNote(ctx context.Context, num int) (*Note, error)
- func (ki *Kibela) PublishMD(ctx context.Context, m *MD, save bool) error
- func (ki *Kibela) PullFullNotes(ctx context.Context, dir, folder string, limit int) error
- func (ki *Kibela) PullNote(ctx context.Context, dir, arg string) error
- func (ki *Kibela) PullNotes(ctx context.Context, dir, folder string, limit int) error
- func (ki *Kibela) PushMD(ctx context.Context, m *MD) error
- type MD
- type Meta
- type Note
- type Time
- type User
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Comment ¶ added in v0.0.5
type Comment struct { ID `json:"id"` Content string `json:"content"` Author User `json:"author"` PublishedAt Time `json:"publishedAt"` Summary string `json:"summary"` }
Comment represents comment of Kibela
type Kibela ¶
type Kibela struct {
// contains filtered or unexported fields
}
Kibela is a client for Kibela API
func (*Kibela) GetComment ¶ added in v0.0.5
GetComment gets kibela comment
func (*Kibela) PullFullNotes ¶
PullFullNotes pull full notes from Kibela
type MD ¶
type MD struct { ID ID FrontMatter *Meta Content string UpdatedAt time.Time // contains filtered or unexported fields }
MD represents local Markdown file
type Meta ¶
type Meta struct { Title string `yaml:"title"` Author string `yaml:"author,omitempty"` Groups []string `yaml:"groups,flow"` Folder string `yaml:"folder,omitempty"` }
Meta is a meta information of entry rendered as FrontMatter
type Note ¶
type Note struct { ID `json:"id"` Title string `json:"title"` Content string `json:"content"` CoEditing bool `json:"coediting"` Folder string `json:"folderName"` Groups []*Group `json:"groups"` Author User `json:"author"` UpdatedAt Time `json:"updatedAt"` PublishedAt Time `json:"publishedAt"` Summary string `json:"summary"` }
Note represents note of Kibela
type Time ¶
Time (un)marshals time for kibela
func (*Time) MarshalJSON ¶
MarshalJSON for encoding/json
func (*Time) UnmarshalJSON ¶
UnmarshalJSON for encoding/json
Click to show internal directories.
Click to hide internal directories.