Documentation ¶
Overview ¶
Package gonduit provides a client for Phabricator's Conduit API.
Index ¶
- Constants
- type Conn
- func (c *Conn) Call(method string, params interface{}, result interface{}) error
- func (c *Conn) CallContext(ctx context.Context, method string, params interface{}, result interface{}) error
- func (c *Conn) ConduitQuery() (*responses.ConduitQueryResponse, error)
- func (c *Conn) Connect() error
- func (c *Conn) ConnectContext(ctx context.Context) error
- func (c *Conn) DifferentialGetCommitMessage(req requests.DifferentialGetCommitMessageRequest) (*responses.DifferentialGetCommitMessageResponse, error)
- func (c *Conn) DifferentialGetCommitPaths(req requests.DifferentialGetCommitPathsRequest) (*responses.DifferentialGetCommitPathsResponse, error)
- func (c *Conn) DifferentialQuery(req requests.DifferentialQueryRequest) (*responses.DifferentialQueryResponse, error)
- func (c *Conn) DifferentialQueryDiffs(req requests.DifferentialQueryDiffsRequest) (*responses.DifferentialQueryDiffsResponse, error)
- func (c *Conn) DiffusionQueryCommits(req requests.DiffusionQueryCommitsRequest) (*responses.DiffusionQueryCommitsResponse, error)
- func (c *Conn) FileDownload(req requests.FileDownloadRequest) (*responses.FileDownloadResponse, error)
- func (c *Conn) MacroCreateMeme(req requests.MacroCreateMemeRequest) (*responses.MacroCreateMemeResponse, error)
- func (c *Conn) ManiphestCreateTask(req requests.ManiphestCreateTaskRequest) (*entities.ManiphestTask, error)
- func (c *Conn) ManiphestGetTaskTransactions(req requests.ManiphestGetTaskTransactions) (*responses.ManiphestGetTaskTransactionsResponse, error)
- func (c *Conn) ManiphestQuery(req requests.ManiphestQueryRequest) (*responses.ManiphestQueryResponse, error)
- func (c *Conn) ManiphestSearch(req requests.ManiphestSearchRequest) (*responses.ManiphestSearchResponse, error)
- func (c *Conn) PHIDLookup(req requests.PHIDLookupRequest) (responses.PHIDLookupResponse, error)
- func (c *Conn) PHIDLookupSingle(name string) (*entities.PHIDResult, error)
- func (c *Conn) PHIDQuery(req requests.PHIDQueryRequest) (responses.PHIDQueryResponse, error)
- func (c *Conn) PHIDQuerySingle(phid string) (*entities.PHIDResult, error)
- func (c *Conn) PasteCreate(req *requests.PasteCreateRequest) (responses.PasteCreateResponse, error)
- func (c *Conn) PasteQuery(req *requests.PasteQueryRequest) (responses.PasteQueryResponse, error)
- func (c *Conn) PhrictionInfo(req requests.PhrictionInfoRequest) (*responses.PhrictionInfoResponse, error)
- func (c *Conn) ProjectQuery(req requests.ProjectQueryRequest) (*responses.ProjectQueryResponse, error)
- func (c *Conn) RemarkupProcess(req requests.RemarkupProcessRequest) (*responses.RemarkupProcessResponse, error)
- func (c *Conn) RepositoryQuery(req requests.RepositoryQueryRequest) (*responses.RepositoryQueryResponse, error)
- func (c *Conn) UserQuery(req requests.UserQueryRequest) (*responses.UserQueryResponse, error)
- type Dialer
Constants ¶
const DifferentialGetCommitMessageMethod = "differential.getcommitmessage"
DifferentialGetCommitMessageMethod is method name on Phabricator API.
const DifferentialGetCommitPathsMethod = "differential.getcommitpaths"
DifferentialGetCommitPathsMethod is method name on Phabricator API.
const DifferentialQueryMethod = "differential.query"
DifferentialQueryMethod is method name on Phabricator API.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Conn ¶
Conn is a connection to the conduit API.
func Dial ¶
func Dial(host string, options *core.ClientOptions) (*Conn, error)
Dial connects to conduit and confirms the API capabilities for future calls.
func DialContext ¶ added in v0.4.0
DialContext connects to conduit and confirms the API capabilities for future calls, passing the given context through.
func (*Conn) Call ¶
Call allows you to make a raw conduit method call. Params will be marshalled as JSON and the result JSON will be unmarshalled into the result interface{}.
This is primarily useful for calling conduit endpoints that aren't specifically supported by other methods in this package.
func (*Conn) CallContext ¶ added in v0.4.0
func (c *Conn) CallContext( ctx context.Context, method string, params interface{}, result interface{}, ) error
CallContext allows you to make a raw conduit method call with the given context. Params will be marshalled as JSON and the result JSON will be unmarshalled into the result interface{}.
This is primarily useful for calling conduit endpoints that aren't specifically supported by other methods in this package.
func (*Conn) ConduitQuery ¶ added in v0.2.0
func (c *Conn) ConduitQuery() (*responses.ConduitQueryResponse, error)
ConduitQuery performs a call to conduit.query.
func (*Conn) Connect ¶
Connect calls conduit.connect to open an authenticated session for future requests.
func (*Conn) ConnectContext ¶ added in v0.4.0
ConnectContext calls conduit.connect to open an authenticated session for future requests, passing through the given context.
func (*Conn) DifferentialGetCommitMessage ¶ added in v0.5.0
func (c *Conn) DifferentialGetCommitMessage( req requests.DifferentialGetCommitMessageRequest, ) (*responses.DifferentialGetCommitMessageResponse, error)
DifferentialGetCommitMessage performs a call to differential.getcommitmessage.
func (*Conn) DifferentialGetCommitPaths ¶ added in v0.4.1
func (c *Conn) DifferentialGetCommitPaths( req requests.DifferentialGetCommitPathsRequest, ) (*responses.DifferentialGetCommitPathsResponse, error)
DifferentialGetCommitPaths performs a call to differential.getcommitpaths.
func (*Conn) DifferentialQuery ¶
func (c *Conn) DifferentialQuery( req requests.DifferentialQueryRequest, ) (*responses.DifferentialQueryResponse, error)
DifferentialQuery performs a call to differential.query.
func (*Conn) DifferentialQueryDiffs ¶ added in v0.4.0
func (c *Conn) DifferentialQueryDiffs( req requests.DifferentialQueryDiffsRequest, ) (*responses.DifferentialQueryDiffsResponse, error)
DifferentialQueryDiffs performs a call to differential.querydiffs.
func (*Conn) DiffusionQueryCommits ¶
func (c *Conn) DiffusionQueryCommits( req requests.DiffusionQueryCommitsRequest, ) (*responses.DiffusionQueryCommitsResponse, error)
DiffusionQueryCommits performs a call to diffusion.querycommits.
func (*Conn) FileDownload ¶
func (c *Conn) FileDownload( req requests.FileDownloadRequest, ) (*responses.FileDownloadResponse, error)
FileDownload performs a call to file.download.
func (*Conn) MacroCreateMeme ¶
func (c *Conn) MacroCreateMeme( req requests.MacroCreateMemeRequest, ) (*responses.MacroCreateMemeResponse, error)
MacroCreateMeme performs a call to macro.creatememe.
func (*Conn) ManiphestCreateTask ¶ added in v0.2.0
func (c *Conn) ManiphestCreateTask( req requests.ManiphestCreateTaskRequest, ) (*entities.ManiphestTask, error)
ManiphestCreateTask performs a call to maniphest.createtask.
func (*Conn) ManiphestGetTaskTransactions ¶ added in v0.3.0
func (c *Conn) ManiphestGetTaskTransactions( req requests.ManiphestGetTaskTransactions, ) (*responses.ManiphestGetTaskTransactionsResponse, error)
func (*Conn) ManiphestQuery ¶
func (c *Conn) ManiphestQuery( req requests.ManiphestQueryRequest, ) (*responses.ManiphestQueryResponse, error)
ManiphestQuery performs a call to maniphest.query.
func (*Conn) ManiphestSearch ¶ added in v0.3.3
func (c *Conn) ManiphestSearch( req requests.ManiphestSearchRequest, ) (*responses.ManiphestSearchResponse, error)
ManiphestSearch performs a call to maniphest.search.
func (*Conn) PHIDLookup ¶
func (c *Conn) PHIDLookup( req requests.PHIDLookupRequest, ) (responses.PHIDLookupResponse, error)
PHIDLookup calls the phid.lookup endpoint.
func (*Conn) PHIDLookupSingle ¶
func (c *Conn) PHIDLookupSingle(name string) (*entities.PHIDResult, error)
PHIDLookupSingle calls the phid.lookup endpoint with a single name.
func (*Conn) PHIDQuery ¶
func (c *Conn) PHIDQuery( req requests.PHIDQueryRequest, ) (responses.PHIDQueryResponse, error)
PHIDQuery calls the phid.query endpoint.
func (*Conn) PHIDQuerySingle ¶
func (c *Conn) PHIDQuerySingle(phid string) (*entities.PHIDResult, error)
PHIDQuerySingle calls the phid.query endpoint with a single phid.
func (*Conn) PasteCreate ¶
func (c *Conn) PasteCreate( req *requests.PasteCreateRequest, ) (responses.PasteCreateResponse, error)
PasteCreate calls the paste.create endpoint.
func (*Conn) PasteQuery ¶
func (c *Conn) PasteQuery( req *requests.PasteQueryRequest, ) (responses.PasteQueryResponse, error)
PasteQuery calls the paste.query endpoint.
func (*Conn) PhrictionInfo ¶ added in v0.3.0
func (c *Conn) PhrictionInfo( req requests.PhrictionInfoRequest, ) (*responses.PhrictionInfoResponse, error)
PhrictionInfo performs a call to phriction.info
func (*Conn) ProjectQuery ¶
func (c *Conn) ProjectQuery( req requests.ProjectQueryRequest, ) (*responses.ProjectQueryResponse, error)
ProjectQuery performs a call to project.query.
func (*Conn) RemarkupProcess ¶ added in v0.3.0
func (c *Conn) RemarkupProcess( req requests.RemarkupProcessRequest, ) (*responses.RemarkupProcessResponse, error)
RemarkupProcess performs a call to remarkup.process
func (*Conn) RepositoryQuery ¶
func (c *Conn) RepositoryQuery( req requests.RepositoryQueryRequest, ) (*responses.RepositoryQueryResponse, error)
RepositoryQuery performs a call to repository.query.
func (*Conn) UserQuery ¶ added in v0.3.0
func (c *Conn) UserQuery( req requests.UserQueryRequest, ) (*responses.UserQueryResponse, error)
UserQuery performs a call to differential.query.
type Dialer ¶
A Dialer contains options for connecting to an address.
func (*Dialer) DialContext ¶ added in v0.4.0
func (d *Dialer) DialContext( ctx context.Context, host string, options *core.ClientOptions, ) (*Conn, error)
DialContext connects to conduit and confirms the API capabilities for future calls, passing the given context through.