Versions in this module Expand all Collapse all v0 v0.0.4 Aug 6, 2022 Changes in this version + const SearchDateFormat type Bookstack + func (b *Bookstack) Search(ctx context.Context, query SearchParams) ([]Search, error) + type ContentType string + const ContentAttachment + const ContentBook + const ContentChapter + const ContentPage + const ContentShelf + type PreviewHTML struct + Content string + Name string + type Search struct + BookID int + ChapterID int + CreatedAt time.Time + Draft bool + ID int + Name string + PreviewHTML PreviewHTML + Slug string + Tags []Tag + Template bool + Type ContentType + URL string + UpdatedAt time.Time + type SearchParams struct + Count *int + CreatedAfter *time.Time + CreatedBefore *time.Time + CreatedBy *string + InBody *string + InName *string + IsRestricted bool + NotViewedByMe bool + OwnedBy *string + Page *int + Query string + Type []ContentType + UpdatedAfter *time.Time + UpdatedBefore *time.Time + UpdatedBy *string + ViewedByMe bool + func (s SearchParams) String(q string) string v0.0.3 Aug 5, 2022 Changes in this version + type Attachment struct + CreatedAt time.Time + CreatedBy int + Extension string + External bool + ID int + Name string + Order int + UpdatedAt time.Time + UpdatedBy int + UploadedTo int + type AttachmentDetailed struct + Content string + CreatedAt time.Time + CreatedBy CreatedBy + Extension string + External bool + ID int + Links Links + Name string + Order int + UpdatedAt time.Time + UpdatedBy UpdatedBy + UploadedTo int + type AttachmentParams struct + File string + Link string + Name string + UploadedTo int + func (a AttachmentParams) Form() (string, io.Reader, error) type Bookstack + func (b *Bookstack) CreateAttachment(ctx context.Context, params AttachmentParams) (Attachment, error) + func (b *Bookstack) DeleteAttachment(ctx context.Context, id int) (bool, error) + func (b *Bookstack) GetAttachment(ctx context.Context, id int) (AttachmentDetailed, error) + func (b *Bookstack) ListAttachments(ctx context.Context, params *QueryParams) ([]Attachment, error) + func (b *Bookstack) UpdateAttachment(ctx context.Context, id int, params AttachmentParams) (Attachment, error) + type Links struct + HTML string + Markdown string + type Parent struct + CreatedAt time.Time + CreatedBy int + Description string + ID int + Name string + OwnedBy int + Slug string + Type string + UpdatedAt time.Time + UpdatedBy int + type RecycledBook struct + ChaptersCount int + PagesCount int + type RecycledChapter struct + BookSlug string + PagesCount int + Parent Parent + type RecycledPage struct + BookID int + BookSlug string + ChapterID int + CreatedAt time.Time + CreatedBy int + Draft bool + Editor string + ID int + Name string + OwnedBy int + Parent Parent + Priority int + RevisionCount int + Slug string + Template bool + UpdatedAt time.Time + UpdatedBy int v0.0.2 Aug 3, 2022 Changes in this version type Bookstack + func (b *Bookstack) CreateChapter(ctx context.Context, params ChapterParams) (Chapter, error) + func (b *Bookstack) CreatePage(ctx context.Context, params PageParams) (Page, error) + func (b *Bookstack) CreateShelf(ctx context.Context, params ShelfParams) (Shelf, error) + func (b *Bookstack) DeleteChapter(ctx context.Context, id int) (bool, error) + func (b *Bookstack) DeletePage(ctx context.Context, id int) (bool, error) + func (b *Bookstack) DeleteRecycleBinItem(ctx context.Context, id int) (int, error) + func (b *Bookstack) DeleteShelf(ctx context.Context, id int) (bool, error) + func (b *Bookstack) ExportBookHTML(ctx context.Context, id int) (io.Reader, error) + func (b *Bookstack) ExportBookMarkdown(ctx context.Context, id int) (io.Reader, error) + func (b *Bookstack) ExportBookPDF(ctx context.Context, id int) (io.Reader, error) + func (b *Bookstack) ExportBookPlaintext(ctx context.Context, id int) (io.Reader, error) + func (b *Bookstack) ExportChapterHTML(ctx context.Context, id int) (io.Reader, error) + func (b *Bookstack) ExportChapterMarkdown(ctx context.Context, id int) (io.Reader, error) + func (b *Bookstack) ExportChapterPDF(ctx context.Context, id int) (io.Reader, error) + func (b *Bookstack) ExportChapterPlaintext(ctx context.Context, id int) (io.Reader, error) + func (b *Bookstack) ExportPageHTML(ctx context.Context, id int) (io.Reader, error) + func (b *Bookstack) ExportPageMarkdown(ctx context.Context, id int) (io.Reader, error) + func (b *Bookstack) ExportPagePDF(ctx context.Context, id int) (io.Reader, error) + func (b *Bookstack) ExportPagePlaintext(ctx context.Context, id int) (io.Reader, error) + func (b *Bookstack) GetChapter(ctx context.Context, id int) (ChapterDetailed, error) + func (b *Bookstack) GetPage(ctx context.Context, id int) (PageDetailed, error) + func (b *Bookstack) GetShelf(ctx context.Context, id int) (ShelfDetailed, error) + func (b *Bookstack) ListChapters(ctx context.Context, params *QueryParams) ([]Chapter, error) + func (b *Bookstack) ListPages(ctx context.Context, params *QueryParams) ([]Page, error) + func (b *Bookstack) ListRecycleBinItems(ctx context.Context) ([]RecycleBinItem, error) + func (b *Bookstack) ListShelves(ctx context.Context, params *QueryParams) ([]Shelf, error) + func (b *Bookstack) RestoreRecyleBinItem(ctx context.Context, id int) (int, error) + func (b *Bookstack) UpdateChapter(ctx context.Context, id int, params ChapterParams) (Chapter, error) + func (b *Bookstack) UpdatePage(ctx context.Context, id int, params PageParams) (Page, error) + func (b *Bookstack) UpdateShelf(ctx context.Context, id int, params ShelfParams) (Shelf, error) + type Chapter struct + BookID int + CreatedAt string + CreatedBy int + Description string + ID int + Name string + OwnedBy int + Priority int + Slug string + UpdatedAt time.Time + UpdatedBy int + type ChapterDetailed struct + BookID int + CreatedAt time.Time + CreatedBy CreatedBy + Description string + ID int + Name string + OwnedBy OwnedBy + Pages []ChapterPage + Priority int + Slug string + Tags []Tag + UpdatedAt time.Time + UpdatedBy UpdatedBy + type ChapterPage struct + BookID int + ChapterID int + CreatedAt time.Time + CreatedBy int + Draft bool + ID int + Name string + Priority int + RevisionCount int + Slug string + Template bool + UpdatedAt time.Time + UpdatedBy int + type ChapterParams struct + BookID int + Description string + Name string + Tags []TagParams + func (bp ChapterParams) Form() (string, io.Reader, error) + type Cover struct + CreatedAt time.Time + CreatedBy int + ID int + Name string + Path string + Type string + URL string + UpdatedAt time.Time + UpdatedBy int + UploadedTo int + type CreatedBy struct + ID int + Name string + type DeletableType string + const DeletedBook + const DeletedChapter + const DeletedPage + const DeletedShelf + type OwnedBy struct + ID int + Name string + type Page struct + BookID int + CreatedAt time.Time + CreatedBy int + Draft bool + ID int + Name string + PageID int + Priority int + RevisionCount int + Slug string + Template bool + UpdatedAt time.Time + UpdatedBy int + type PageDetailed struct + BookID int + ChapterID int + CreatedAt time.Time + CreatedBy CreatedBy + Draft bool + HTML string + ID int + Markdown string + Name string + OwnedBy OwnedBy + Priority int + RevisionCount int + Slug string + Tags []Tag + Template bool + UpdatedAt time.Time + UpdatedBy UpdatedBy + type PageParams struct + BookID int + ChapterID int + HTML string + Markdown string + Name string + Tags []TagParams + func (bp PageParams) Form() (string, io.Reader, error) + type RecycleBinItem struct + CreatedAt time.Time + Deletable json.RawMessage + DeletableID int + DeletableType DeletableType + DeletedBy int + ID int + UpdatedAt time.Time + func (i RecycleBinItem) Book() (*Book, bool) + func (i RecycleBinItem) Chapter() (*Chapter, bool) + func (i RecycleBinItem) Page() (*Page, bool) + func (i RecycleBinItem) Shelf() (*Shelf, bool) + type Shelf struct + CreatedAt time.Time + CreatedBy int + Description string + ID int + Name string + OwnedBy int + Slug string + UpdatedAt time.Time + UpdatedBy int + type ShelfDetailed struct + Books []Book + Cover Cover + CreatedAt time.Time + CreatedBy CreatedBy + Description string + ID int + Name string + OwnedBy OwnedBy + Slug string + Tags []Tag + UpdatedAt time.Time + UpdatedBy UpdatedBy + type ShelfParams struct + Books []int + Description string + Image string + Name string + Tags []TagParams + func (bp ShelfParams) Form() (string, io.Reader, error) + type TagParams struct + Name string + Value string + type UpdatedBy struct + ID int + Name string type UserDeleteParams + func (ud UserDeleteParams) Form() (string, io.Reader, error) type UserParams + func (u UserParams) Form() (string, io.Reader, error) v0.0.1 Aug 1, 2022 Changes in this version + func ParseMultiple(data []byte) (g, error) + func ParseSingle(data []byte) (s, error) + type Blank struct + func (b Blank) Form() (string, io.Reader, error) + type Book struct + CreatedAt time.Time + CreatedBy int + Description string + ID int + Name string + OwnedBy int + Slug string + UpdatedAt time.Time + UpdatedBy int + type BookDetailed struct + Cover struct{ ... } + CreatedAt time.Time + CreatedBy struct{ ... } + Description string + ID int + Name string + OwnedBy struct{ ... } + Slug string + Tags []struct{ ... } + UpdatedAt time.Time + UpdatedBy struct{ ... } + type BookParams struct + Description string + Image string + Name string + func (bp BookParams) Form() (string, io.Reader, error) + type Bookstack struct + func New(opts ...Option) *Bookstack + func (b *Bookstack) CreateBook(ctx context.Context, params BookParams) (Book, error) + func (b *Bookstack) CreateUser(ctx context.Context, params UserParams) (User, error) + func (b *Bookstack) DeleteBook(ctx context.Context, id int) (bool, error) + func (b *Bookstack) DeleteUser(ctx context.Context, id int, params *UserDeleteParams) (bool, error) + func (b *Bookstack) GetBook(ctx context.Context, id int) (BookDetailed, error) + func (b *Bookstack) GetUser(ctx context.Context, id int) (User, error) + func (b *Bookstack) ListBooks(ctx context.Context, params *QueryParams) ([]Book, error) + func (b *Bookstack) ListUsers(ctx context.Context, params *QueryParams) ([]User, error) + func (b *Bookstack) UpdateBook(ctx context.Context, id int, params BookParams) (Book, error) + func (b *Bookstack) UpdateUser(ctx context.Context, id int, params UserParams) (User, error) + type Form interface + Form func() (string, io.Reader, error) + type Group interface + type Option func(*Bookstack) + func SetLogger(l *log.Logger) Option + func SetRateLimit(limit int) Option + func SetToken(id, secret string) Option + func SetURL(url string) Option + type QueryParams struct + Count int + FilterField string + FilterValue string + Offset int + SortDescending bool + SortField string + func (q *QueryParams) String(l string) string + type Response struct + Data json.RawMessage + Err struct{ ... } + Total int + func (r Response) Error() error + type Single interface + type Tag struct + ID string + Name string + Order int + Value string + type TagReq struct + Name string + Value string + type User struct + AvatarURL string + CreatedAt time.Time + EditURL string + Email string + ExternalAuthID string + ID int + Name string + ProfileURL string + Roles []struct{ ... } + Slug string + UpdatedAt time.Time + type UserDeleteParams struct + MigrateOwnershipID int + type UserParams struct + Email string + ExternalAuthID string + Language string + Name string + Password string + Roles []int + SendInvite bool