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 ¶
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 ¶
type ConfluenceClient interface { SearchSpaces(*ConfluenceSpaceSearchInput) ([]ConfluenceSpace, *ConfluencePaging, error) SearchPages(*ConfluencePageSearchInput) ([]ConfluenceContent, *ConfluencePaging, error) CreatePage(ConfluencePageCreationInput) error }
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 ¶
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.