confluence

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Jun 22, 2023 License: MPL-2.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DeleteContentById

func DeleteContentById(config Config, contentId int64) (http.Response, error)

func RemovePreviousVersions

func RemovePreviousVersions(config Config, contentId int64, numberOfVersionsToKeep int64) error

Types

type Config

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

func NewConfig

func NewConfig(baseUrl string, userName string, apiKey string) *Config

type ContentDetail

type ContentDetail struct {
	Id                 int64                `json:"id"`
	Title              string               `json:"title"`
	Version            ContentDetailVersion `json:"version"`
	SpaceId            int64                `json:"spaceId"`
	CreatedAt          time.Time            `json:"createdAt"`
	Body               ContentOperationBody `json:"body"`
	ParentContentId    int64                `json:"parentId"`
	ResponseStatusCode int
	ResponseStatus     string
	ResponseBody       string
}

func CreateNewPage

func CreateNewPage(config Config, parentContentId int64, title string, body string) (ContentDetail, error)

func GetContentDetailById

func GetContentDetailById(config Config, contentId int64) (ContentDetail, error)

func UpdateContentById

func UpdateContentById(config Config, contentId int64, body string, removePreviousVersions bool) (ContentDetail, error)

type ContentDetailVersion

type ContentDetailVersion struct {
	Number    int64     `json:"number"`
	CreatedAt time.Time `json:"createdAt"`
}

type ContentNewOperationRequest

type ContentNewOperationRequest struct {
	Status          string                  `json:"status"`
	Title           string                  `json:"title"`
	SpaceId         int64                   `json:"spaceId"`
	Body            ContentOperationBody    `json:"body"`
	Version         ContentOperationVersion `json:"version"`
	ParentContentId int64                   `json:"parentId"`
}

func NewNewOperationRequest

func NewNewOperationRequest(title string, spaceId int64, body string, parentContentId int64) (ContentNewOperationRequest, error)

type ContentOperationBody

type ContentOperationBody struct {
	Storage ContentOperationBodyStorage `json:"storage"`
}

type ContentOperationBodyStorage

type ContentOperationBodyStorage struct {
	Value          string `json:"value"`
	Representation string `json:"representation"`
}

type ContentOperationVersion

type ContentOperationVersion struct {
	Number int64 `json:"number"`
}

type ContentUpdateOperationRequest

type ContentUpdateOperationRequest struct {
	Id      int64                   `json:"id"`
	Status  string                  `json:"status"`
	Title   string                  `json:"title"`
	SpaceId int64                   `json:"spaceId"`
	Body    ContentOperationBody    `json:"body"`
	Version ContentOperationVersion `json:"version"`
}

func NewUpdateOperationRequest

func NewUpdateOperationRequest(detail ContentDetail, body string) (ContentUpdateOperationRequest, error)

Jump to

Keyboard shortcuts

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