catelyn

package
v0.0.0-...-ce6acfe Latest Latest
Warning

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

Go to latest
Published: Dec 13, 2017 License: MIT Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Command

type Command interface {
	Exec(*kingpin.ParseContext) error
	Configure(*kingpin.CmdClause)
}

Command implementations representan interface that can be used as a configurable kingpin action.

func NewCreatePageCommand

func NewCreatePageCommand(output io.Writer, input io.Reader, config *GlobalCLIOptions) Command

NewCreatePageCommand returns an implementation of the command interface used for creating confluence pages.

func NewSearchPagesCommand

func NewSearchPagesCommand(out io.Writer, config *GlobalCLIOptions) Command

NewSearchPagesCommand returns an executable kingpin action for searching pages.

func NewSearchSpacesCommand

func NewSearchSpacesCommand(out io.Writer, config *GlobalCLIOptions) Command

NewSearchSpacesCommand returns an executable kingpin action for searching spaces.

type ConfluenceClient

ConfluenceClient is an interface to the confluence http rest api.

func NewConfluenceClient

func NewConfluenceClient(user *url.Userinfo, hostname string) (ConfluenceClient, error)

NewConfluenceClient returns a client implementing the client interface.

type ConfluenceContent

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

ConfluenceContent represents individual json items returned from the content api.

type ConfluencePageCreationInput

type ConfluencePageCreationInput struct {
	SpaceKey string
	Title    string
	ParentID string
}

ConfluencePageCreationInput is used by the confluence client to create pages.

type ConfluencePageSearchInput

type ConfluencePageSearchInput struct {
	ConfluencePaging
	Title    string
	SpaceKey string
}

ConfluencePageSearchInput represents the space search query parameters.

type ConfluencePaging

type ConfluencePaging struct {
	Limit uint8 `json:"limit"`
	Start uint8 `json:"start"`
	Size  uint8 `json:"size"`
	Links struct {
		Next     string `json:"next"`
		Previous string `json:"previous"`
	} `json:"_links"`
}

ConfluencePaging represents paging information returned from the confluence rest api.

type ConfluenceSpace

type ConfluenceSpace struct {
	ID   int    `json:"id"`
	Key  string `json:"key"`
	Name string `json:"name"`
	Kind string `json:"type"`
}

ConfluenceSpace represents a space object in confluence.

type ConfluenceSpaceSearchInput

type ConfluenceSpaceSearchInput struct {
	ConfluencePaging
	Type string
}

ConfluenceSpaceSearchInput represents the space search query parameters.

type GlobalCLIOptions

type GlobalCLIOptions struct {
	ConfluenceHost     string
	ConfluenceUsername string
	ConfluencePassword string
}

GlobalCLIOptions are shared flag values across every catelyn command.

func (*GlobalCLIOptions) UserInfo

func (o *GlobalCLIOptions) UserInfo() *url.Userinfo

UserInfo returns the confluence username and password as a url.Userinfo reference.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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