confluence

package
v0.2.6 Latest Latest
Warning

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

Go to latest
Published: May 11, 2026 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Attachment

type Attachment struct {
	ID        string            `json:"id"`
	Type      string            `json:"type"`
	Status    string            `json:"status"`
	Title     string            `json:"title"`
	MediaType string            `json:"mediaType"`
	FileSize  int64             `json:"fileSize"`
	Links     map[string]string `json:"_links"`
}

type AttachmentResponse

type AttachmentResponse struct {
	Results []Attachment `json:"results"`
	Size    int          `json:"size"`
}

type BodyContent

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

type Client

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

func NewClient

func NewClient(cfg *config.AtlassianConfig) *Client

func (*Client) AddLabels

func (c *Client) AddLabels(ctx context.Context, pageID string, labels []string) error

func (*Client) AddRestriction

func (c *Client) AddRestriction(ctx context.Context, pageID string, input *RestrictionInput) error

func (*Client) CreatePage

func (c *Client) CreatePage(ctx context.Context, input *CreatePageInput) (*Page, error)

func (*Client) DownloadAttachment

func (c *Client) DownloadAttachment(ctx context.Context, downloadPath string) (io.ReadCloser, error)

func (*Client) GetAttachments

func (c *Client) GetAttachments(ctx context.Context, pageID string) ([]Attachment, error)

func (*Client) GetLabels

func (c *Client) GetLabels(ctx context.Context, pageID string) ([]Label, error)

func (*Client) GetPage

func (c *Client) GetPage(ctx context.Context, id string, expand []string) (*Page, error)

func (*Client) GetRestrictions

func (c *Client) GetRestrictions(ctx context.Context, pageID string) ([]Restriction, error)

func (*Client) RemoveLabel

func (c *Client) RemoveLabel(ctx context.Context, pageID, label string) error

func (*Client) RemoveRestriction

func (c *Client) RemoveRestriction(ctx context.Context, pageID string, input *RestrictionInput) error

func (*Client) UpdatePage

func (c *Client) UpdatePage(ctx context.Context, id string, input *UpdatePageInput) (*Page, error)

type CreatePageInput

type CreatePageInput struct {
	SpaceKey string
	Title    string
	Body     string
	ParentID string
}

type Group

type Group struct {
	Type string `json:"type"`
	Name string `json:"name"`
}

type Label

type Label struct {
	Prefix string `json:"prefix"`
	Name   string `json:"name"`
	ID     string `json:"id"`
}

type LabelResponse

type LabelResponse struct {
	Results []Label `json:"results"`
	Size    int     `json:"size"`
}
type Links struct {
	WebUI string `json:"webui"`
	Self  string `json:"self"`
	Base  string `json:"base"`
}

type Page

type Page struct {
	ID      string   `json:"id"`
	Type    string   `json:"type"`
	Status  string   `json:"status"`
	Title   string   `json:"title"`
	Body    PageBody `json:"body"`
	Version Version  `json:"version"`
	Links   Links    `json:"_links"`
}

type PageBody

type PageBody struct {
	Storage *BodyContent `json:"storage,omitempty"`
	View    *BodyContent `json:"view,omitempty"`
}

type Restriction

type Restriction struct {
	Operation string              `json:"operation"`
	User      *RestrictionSubject `json:"restrictions,omitempty"`
}

type RestrictionGroups

type RestrictionGroups struct {
	Results []Group `json:"results"`
	Size    int     `json:"size"`
}

type RestrictionInput

type RestrictionInput struct {
	Operation string // "update" or "read"
	Type      string // "user" or "group"
	Name      string // username or group name
}

type RestrictionSubject

type RestrictionSubject struct {
	User  *RestrictionUsers  `json:"user,omitempty"`
	Group *RestrictionGroups `json:"group,omitempty"`
}

type RestrictionUsers

type RestrictionUsers struct {
	Results []User `json:"results"`
	Size    int    `json:"size"`
}

type UpdatePageInput

type UpdatePageInput struct {
	Title   string
	Body    string
	Version int
	Message string
}

type User

type User struct {
	Type        string `json:"type"`
	AccountID   string `json:"accountId"`
	DisplayName string `json:"displayName"`
}

type Version

type Version struct {
	Number  int    `json:"number"`
	When    string `json:"when"`
	Message string `json:"message"`
	By      *User  `json:"by"`
}

Jump to

Keyboard shortcuts

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