plugins

package
v3.21.0 Latest Latest
Warning

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

Go to latest
Published: Jul 4, 2025 License: Apache-2.0 Imports: 21 Imported by: 2

Documentation

Index

Constants

View Source
const (
	PALIGO_RATE_LIMIT_CHECK_INTERVAL = 5 * time.Second
	PALIGO_DOCUMENT_SHOW_LIMIT       = 50
	PALIGO_FOLDER_SHOW_LIMIT         = 50
)

https://paligo.net/docs/apidocs/en/index-en.html#UUID-a5b548af-9a37-d305-f5a8-11142d86fe20

Variables

This section is empty.

Functions

func GetGitStartAndEndLine

func GetGitStartAndEndLine(gitInfo *GitInfo, localStartLine, localEndLine int) (int, int, error)

GetGitStartAndEndLine walks the diff hunks and discover the actual start and end lines of the file

Types

type Channels

type Channels struct {
	Items     chan ISourceItem
	Errors    chan error
	WaitGroup *sync.WaitGroup
}

type Component

type Component struct {
	PaligoItem
	Subtype          string        `json:"subtype"`
	Creator          int           `json:"creator"`
	Owner            int           `json:"owner"`
	Author           int           `json:"author"`
	CreatedAt        int           `json:"created_at"`
	ModifiedAt       int           `json:"modified_at"`
	Checkout         bool          `json:"checkout"`
	CheckoutUser     string        `json:"checkout_user"`
	ParentResource   int           `json:"parent_resource"`
	Taxonomies       []interface{} `json:"taxonomies"`
	ReleaseStatus    string        `json:"release_status"`
	Content          string        `json:"content"`
	Languages        []string      `json:"languages"`
	External         []interface{} `json:"external"`
	CustomAttributes []interface{} `json:"custom_attributes"`
}

type ConfluencePage

type ConfluencePage struct {
	ID    string `json:"id"`
	Type  string `json:"type"`
	Title string `json:"title"`
}

type ConfluencePageContent

type ConfluencePageContent struct {
	Body struct {
		Storage struct {
			Value string `json:"value"`
		} `json:"storage"`
	} `json:"body"`
	History struct {
		PreviousVersion struct {
			Number int
		} `json:"previousVersion"`
	} `json:"history"`
	Version struct {
		Number int `json:"number"`
	} `json:"version"`
	Links map[string]string `json:"_links"`
}

type ConfluencePageResponse

type ConfluencePageResponse struct {
	Results ConfluencePageResult `json:"page"`
}

type ConfluencePageResult

type ConfluencePageResult struct {
	Pages []ConfluencePage `json:"results"`
}

type ConfluencePlugin

type ConfluencePlugin struct {
	Plugin
	Spaces  []string
	History bool
	// contains filtered or unexported fields
}

func (*ConfluencePlugin) DefineCommand

func (p *ConfluencePlugin) DefineCommand(items chan ISourceItem, errors chan error) (*cobra.Command, error)

func (*ConfluencePlugin) GetName

func (p *ConfluencePlugin) GetName() string

type ConfluenceSpaceResponse

type ConfluenceSpaceResponse struct {
	Results []ConfluenceSpaceResult `json:"results"`
	Size    int                     `json:"size"`
}

type ConfluenceSpaceResult

type ConfluenceSpaceResult struct {
	ID    int               `json:"id"`
	Key   string            `json:"key"`
	Name  string            `json:"Name"`
	Links map[string]string `json:"_links"`
}

type DiffType

type DiffType int
const (
	AddedContent DiffType = iota
	RemovedContent
)

type DiscordPlugin

type DiscordPlugin struct {
	Token            string
	Guilds           []string
	Channels         []string
	Count            int
	BackwardDuration time.Duration
	Session          *discordgo.Session
	// contains filtered or unexported fields
}

func (*DiscordPlugin) DefineCommand

func (p *DiscordPlugin) DefineCommand(items chan ISourceItem, errors chan error) (*cobra.Command, error)

func (*DiscordPlugin) GetName

func (p *DiscordPlugin) GetName() string

type Document

type Document struct {
	PaligoItem
	Content   string   `json:"content"`
	Languages []string `json:"languages"`
}

type EmptyFolder

type EmptyFolder struct {
	PaligoItem
	Children string `json:"children"`
}

type FileSystemPlugin

type FileSystemPlugin struct {
	Plugin
	Path        string
	ProjectName string
	Ignored     []string
}

func (*FileSystemPlugin) DefineCommand

func (p *FileSystemPlugin) DefineCommand(items chan ISourceItem, errors chan error) (*cobra.Command, error)

func (*FileSystemPlugin) GetName

func (p *FileSystemPlugin) GetName() string

type Folder

type Folder struct {
	PaligoItem
	Children []PaligoItem `json:"children"`
}

type GitInfo

type GitInfo struct {
	Hunks       []*gitdiff.TextFragment
	ContentType DiffType
}

type GitPlugin

type GitPlugin struct {
	Plugin
	Channels
	// contains filtered or unexported fields
}

func (*GitPlugin) DefineCommand

func (p *GitPlugin) DefineCommand(items chan ISourceItem, errors chan error) (*cobra.Command, error)

func (*GitPlugin) GetName

func (p *GitPlugin) GetName() string

type IConfluenceClient

type IConfluenceClient interface {
	// contains filtered or unexported methods
}

type IPlugin

type IPlugin interface {
	GetName() string
	DefineCommand(items chan ISourceItem, errors chan error) (*cobra.Command, error)
}

type ISlackClient

type ISlackClient interface {
	GetConversations(*slack.GetConversationsParameters) ([]slack.Channel, string, error)
	ListTeams(slack.ListTeamsParameters) ([]slack.Team, string, error)
}

type ISourceItem

type ISourceItem interface {
	GetContent() *string
	GetID() string
	GetSource() string
	GetGitInfo() *GitInfo
}

type ListFoldersResponse

type ListFoldersResponse struct {
	Page       int           `json:"page"`
	NextPage   string        `json:"next_page"`
	TotalPages int           `json:"total_pages"`
	Folders    []EmptyFolder `json:"folders"`
}

type PaligoClient

type PaligoClient struct {
	Instance string
	// contains filtered or unexported fields
}

type PaligoItem

type PaligoItem struct {
	ID   int    `json:"id"`
	Name string `json:"name"`
	UUID string `json:"uuid"`
	Type string `json:"type"`
}

type PaligoPlugin

type PaligoPlugin struct {
	Plugin
	Channels
	// contains filtered or unexported fields
}

func (*PaligoPlugin) DefineCommand

func (p *PaligoPlugin) DefineCommand(items chan ISourceItem, errors chan error) (*cobra.Command, error)

func (*PaligoPlugin) GetAuthorizationHeader

func (p *PaligoPlugin) GetAuthorizationHeader() string

func (*PaligoPlugin) GetCredentials

func (p *PaligoPlugin) GetCredentials() (string, string)

func (*PaligoPlugin) GetName

func (p *PaligoPlugin) GetName() string

type Plugin

type Plugin struct {
	ID    string
	Limit chan struct{}
}

type SlackPlugin

type SlackPlugin struct {
	Plugin
	Channels
	Token string
}

func (*SlackPlugin) DefineCommand

func (p *SlackPlugin) DefineCommand(items chan ISourceItem, errors chan error) (*cobra.Command, error)

func (*SlackPlugin) GetName

func (p *SlackPlugin) GetName() string

Jump to

Keyboard shortcuts

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