Documentation
¶
Index ¶
- Constants
- Variables
- type Ancestor
- type Markdown2Confluence
- type MarkdownFile
- func (f *MarkdownFile) FindOrCreateAncestor(m *Markdown2Confluence, client *confluence.Client, ancestorID, parent string) (string, error)
- func (f *MarkdownFile) FindOrCreateAncestors(m *Markdown2Confluence) (ancestorID string, err error)
- func (f *MarkdownFile) FormattedPath() (s string)
- func (f *MarkdownFile) String() (urlPath string)
- func (f *MarkdownFile) Upload(m *Markdown2Confluence) (urlPath string, err error)
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 Parallelism = 5 )
Variables ¶
View Source
var ParentIndex = make(map[string]string)
ParentIndex caches parent page Ids for futures reference
Functions ¶
This section is empty.
Types ¶
type Ancestor ¶
type Ancestor struct {
ID string `json:"id,omitempty"`
}
Ancestor TODO: move this to go-confluence api
type Markdown2Confluence ¶
type Markdown2Confluence struct { Space string Comment string Title string File string Ancestor string Debug bool UseDocumentTitle bool WithHardWraps bool Since int Username string Password string AccessToken string InsecureTLS bool Endpoint string Parent string SourceMarkdown []string ExcludeFilePatterns []string // contains filtered or unexported fields }
Markdown2Confluence stores the settings for each run
func (*Markdown2Confluence) CreateClient ¶
func (m *Markdown2Confluence) CreateClient()
CreateClient returns a new markdown client
func (*Markdown2Confluence) IsExcluded ¶
func (m *Markdown2Confluence) IsExcluded(p string) bool
func (*Markdown2Confluence) SourceEnvironmentVariables ¶
func (m *Markdown2Confluence) SourceEnvironmentVariables()
SourceEnvironmentVariables overrides Markdown2Confluence with any environment variables that are set
- CONFLUENCE_USERNAME
- CONFLUENCE_PASSWORD
- CONFLUENCE_ENDPOINT
func (Markdown2Confluence) Validate ¶
func (m Markdown2Confluence) Validate() error
Validate required configs are set
type MarkdownFile ¶
MarkdownFile contains information about the file to upload
func (*MarkdownFile) FindOrCreateAncestor ¶
func (f *MarkdownFile) FindOrCreateAncestor(m *Markdown2Confluence, client *confluence.Client, ancestorID, parent string) (string, error)
FindOrCreateAncestor creates an empty page to represent a local "folder" name
func (*MarkdownFile) FindOrCreateAncestors ¶
func (f *MarkdownFile) FindOrCreateAncestors(m *Markdown2Confluence) (ancestorID string, err error)
FindOrCreateAncestors creates an empty page to represent a local "folder" name
func (*MarkdownFile) FormattedPath ¶
func (f *MarkdownFile) FormattedPath() (s string)
FormattedPath returns the Path with Parents
func (*MarkdownFile) String ¶
func (f *MarkdownFile) String() (urlPath string)
func (*MarkdownFile) Upload ¶
func (f *MarkdownFile) Upload(m *Markdown2Confluence) (urlPath string, err error)
Upload a markdown file
Click to show internal directories.
Click to hide internal directories.