Documentation ¶
Index ¶
- Constants
- type Markdown2Confluence
- func (m *Markdown2Confluence) Close() func() error
- func (m *Markdown2Confluence) Import() error
- func (m *Markdown2Confluence) Init() error
- func (m *Markdown2Confluence) IsExcluded(p string) bool
- func (m *Markdown2Confluence) IsIncluded(info os.FileInfo) bool
- func (m *Markdown2Confluence) PrepareSync() (int, int, int, error)
- func (m *Markdown2Confluence) PurgeSpace() error
- func (m *Markdown2Confluence) Sync() error
- func (m Markdown2Confluence) Validate() error
- type MarkdownFile
Constants ¶
View Source
const ( // DefaultEndpoint provides an example endpoint for users DefaultEndpoint = "https://mydomain.atlassian.net/wiki" // Parallelism determines how many files to convert and upload at a time // TODO: fix race condition against m.files map Parallelism = 1 )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Markdown2Confluence ¶
type Markdown2Confluence struct { confluence.Client Space string SpaceID string Comment string Title string LocalStore string UseDocumentTitle bool ForceUpdates bool WithHardWraps bool APIToken string Parent string SourceMarkdown []string ExcludeFilePatterns []string // contains filtered or unexported fields }
Markdown2Confluence stores the settings for each run
func (*Markdown2Confluence) Close ¶
func (m *Markdown2Confluence) Close() func() error
func (*Markdown2Confluence) Import ¶
func (m *Markdown2Confluence) Import() error
Import imports remote pages to local database
func (*Markdown2Confluence) Init ¶
func (m *Markdown2Confluence) Init() error
func (*Markdown2Confluence) IsExcluded ¶
func (m *Markdown2Confluence) IsExcluded(p string) bool
func (*Markdown2Confluence) IsIncluded ¶
func (m *Markdown2Confluence) IsIncluded(info os.FileInfo) bool
func (*Markdown2Confluence) PrepareSync ¶
func (m *Markdown2Confluence) PrepareSync() (int, int, int, error)
func (*Markdown2Confluence) PurgeSpace ¶
func (m *Markdown2Confluence) PurgeSpace() error
func (*Markdown2Confluence) Sync ¶
func (m *Markdown2Confluence) Sync() error
func (Markdown2Confluence) Validate ¶
func (m Markdown2Confluence) Validate() error
Validate required configs are set
type MarkdownFile ¶
type MarkdownFile struct { ID string `json:"id"` Path string `json:"path"` Title string `json:"title"` Parent string `json:"parent"` RemoteID string `json:"remote_id"` RemoteParentID string `json:"parent_id"` Status string `json:"status"` MD5Sum string `json:"md5sum"` Link string `json:"link:"` }
MarkdownFile contains information about the file to upload
func GetStoredMarkdownFile ¶
func GetStoredMarkdownFile(db *bolt.DB, ID string) (*MarkdownFile, error)
func (*MarkdownFile) Logger ¶
func (f *MarkdownFile) Logger() *log.Entry
func (*MarkdownFile) String ¶
func (f *MarkdownFile) String() (urlPath string)
func (*MarkdownFile) Upload ¶
func (mf *MarkdownFile) Upload(m *Markdown2Confluence) (*confluence.Page, error)
Upload a markdown file
Source Files ¶
Click to show internal directories.
Click to hide internal directories.