confluence

package
v0.0.0-...-386ad9e Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Sep 1, 2022 License: Unlicense Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type BodyValue

type BodyValue struct {
	Value string `json:"value"`
}

type Confluence

type Confluence struct {
	// contains filtered or unexported fields
}

func NewClient

func NewClient(config *config.Confluence) *Confluence

func (*Confluence) FindPagesIDs

func (c *Confluence) FindPagesIDs(text string) []string

func (*Confluence) FindPagesSpaceTitles

func (c *Confluence) FindPagesSpaceTitles(text string) []SpaceTitle

func (*Confluence) FindPagesViewIDs

func (c *Confluence) FindPagesViewIDs(text string) []string

func (*Confluence) GetByKey

func (c *Confluence) GetByKey(ctx context.Context, pageID string) (interface{}, error)

func (*Confluence) GetCurrentUser

func (c *Confluence) GetCurrentUser() (string, error)

func (*Confluence) GetPageCtx

func (c *Confluence) GetPageCtx(ctx context.Context, pageID string) (*Page, error)

func (*Confluence) GetPageIdBySpaceTitle

func (c *Confluence) GetPageIdBySpaceTitle(st SpaceTitle) (string, error)

func (*Confluence) GetPages

func (c *Confluence) GetPages(pageIDs []string) ([]*Page, error)

type Page

type Page struct {
	ID     string `json:"id"`
	Type   string `json:"types"`
	Status string `json:"status"`
	Title  string `json:"title"`
	Space  struct {
		ID   int    `json:"id"`
		Key  string `json:"key"`
		Name string `json:"name"`
	} `json:"space"`
	Links struct {
		WebUI  string `json:"webui"`
		TinyUI string `json:"tinyui"`
		Base   string `json:"base"`
	} `json:"_links"`
	History struct {
		Latest      bool `json:"latest"`
		CreatedDate Time `json:"createdDate"`
		CreatedBy   struct {
			Username    string `json:"username"`
			DisplayName string `json:"displayName"`
		} `json:"createdBy"`
		LastUpdated struct {
			By struct {
				Username    string `json:"username"`
				DisplayName string `json:"displayName"`
			} `json:"by"`
			When   Time `json:"when"`
			Number int  `json:"number"`
		} `json:"lastUpdated"`
	} `json:"history"`
	Body struct {
		Editor              *BodyValue `json:"editor,omitempty"`
		View                *BodyValue `json:"view,omitempty"`
		ExportView          *BodyValue `json:"export_view,omitempty"`
		Storage             *BodyValue `json:"storage,omitempty"`
		AnonymousExportView *BodyValue `json:"anonymous_export_view,omitempty"`
		StyledView          *BodyValue `json:"styled_view,omitempty"`
	} `json:"body"`
}

func (*Page) CreatedBy

func (p *Page) CreatedBy() *Person

func (*Page) CreatedDate

func (p *Page) CreatedDate() time.Time

func (*Page) Description

func (p *Page) Description() string

func (*Page) GetStatus

func (p *Page) GetStatus() string

func (*Page) LastVersionNumber

func (p *Page) LastVersionNumber() string

func (*Page) Latest

func (p *Page) Latest() string
func (p *Page) Link() string

func (*Page) SpaceName

func (p *Page) SpaceName() string

func (*Page) UpdatedBy

func (p *Page) UpdatedBy() *Person

func (*Page) UpdatedDate

func (p *Page) UpdatedDate() time.Time

type PageSearchResult

type PageSearchResult struct {
	Size    int `json:"size"`
	Start   int `json:"start"`
	Limit   int `json:"limit"`
	Results []struct {
		ID    string `json:"id"`
		Title string `json:"title"`
		Type  string `json:"type"`
	} `json:"results"`
}

type Person

type Person struct {
	Name        string `json:"name"`
	DisplayName string `json:"displayName"`
}

func (*Person) JiraName

func (p *Person) JiraName() string

func (*Person) RealName

func (p *Person) RealName() string

type SpaceTitle

type SpaceTitle struct {
	Space string
	Title string
}

type Time

type Time time.Time

func (*Time) UnmarshalJSON

func (t *Time) UnmarshalJSON(b []byte) error

type User

type User struct {
	Username    string `json:"username"`
	DisplayName string `json:"displayName"`
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL