gonduit: github.com/etcinit/gonduit Index | Files | Directories

package gonduit

import "github.com/etcinit/gonduit"

Package gonduit provides a client for Phabricator's Conduit API.


Package Files

client.go conduit.go dialer.go differential.go diffusion.go file.go macro.go maniphest.go paste.go phid.go phriction.go projects.go remarkup.go repository.go user.go

type Conn Uses

type Conn struct {
    Session *entities.Session
    // contains filtered or unexported fields

Conn is a connection to the conduit API.

func Dial Uses

func Dial(host string, options *core.ClientOptions) (*Conn, error)

Dial connects to conduit and confirms the API capabilities for future calls.

func (*Conn) Call Uses

func (c *Conn) Call(
    method string,
    params interface{},
    result interface{},
) error

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) ConduitQuery Uses

func (c *Conn) ConduitQuery() (*responses.ConduitQueryResponse, error)

ConduitQuery performs a call to conduit.query.

func (*Conn) Connect Uses

func (c *Conn) Connect() error

Connect calls conduit.connect to open an authenticated session for future requests.

func (*Conn) DifferentialQuery Uses

func (c *Conn) DifferentialQuery(
    req requests.DifferentialQueryRequest,
) (*responses.DifferentialQueryResponse, error)

DifferentialQuery performs a call to differential.query.

func (*Conn) DiffusionQueryCommits Uses

func (c *Conn) DiffusionQueryCommits(
    req requests.DiffusionQueryCommitsRequest,
) (*responses.DiffusionQueryCommitsResponse, error)

DiffusionQueryCommits performs a call to diffusion.querycommits.

func (*Conn) FileDownload Uses

func (c *Conn) FileDownload(
    req requests.FileDownloadRequest,
) (*responses.FileDownloadResponse, error)

FileDownload performs a call to file.download.

func (*Conn) MacroCreateMeme Uses

func (c *Conn) MacroCreateMeme(
    req requests.MacroCreateMemeRequest,
) (*responses.MacroCreateMemeResponse, error)

MacroCreateMeme performs a call to macro.creatememe.

func (*Conn) ManiphestCreateTask Uses

func (c *Conn) ManiphestCreateTask(
    req requests.ManiphestCreateTaskRequest,
) (*entities.ManiphestTask, error)

ManiphestCreateTask performs a call to maniphest.createtask.

func (*Conn) ManiphestGetTaskTransactions Uses

func (c *Conn) ManiphestGetTaskTransactions(
    req requests.ManiphestGetTaskTransactions,
) (*responses.ManiphestGetTaskTransactionsResponse, error)

func (*Conn) ManiphestQuery Uses

func (c *Conn) ManiphestQuery(
    req requests.ManiphestQueryRequest,
) (*responses.ManiphestQueryResponse, error)

ManiphestQuery performs a call to maniphest.query.

func (*Conn) PHIDLookup Uses

func (c *Conn) PHIDLookup(
    req requests.PHIDLookupRequest,
) (responses.PHIDLookupResponse, error)

PHIDLookup calls the phid.lookup endpoint.

func (*Conn) PHIDLookupSingle Uses

func (c *Conn) PHIDLookupSingle(name string) (*entities.PHIDResult, error)

PHIDLookupSingle calls the phid.lookup endpoint with a single name.

func (*Conn) PHIDQuery Uses

func (c *Conn) PHIDQuery(
    req requests.PHIDQueryRequest,
) (responses.PHIDQueryResponse, error)

PHIDQuery calls the phid.query endpoint.

func (*Conn) PHIDQuerySingle Uses

func (c *Conn) PHIDQuerySingle(phid string) (*entities.PHIDResult, error)

PHIDQuerySingle calls the phid.query endpoint with a single phid.

func (*Conn) PasteCreate Uses

func (c *Conn) PasteCreate(
    req *requests.PasteCreateRequest,
) (responses.PasteCreateResponse, error)

PasteCreate calls the paste.create endpoint.

func (*Conn) PasteQuery Uses

func (c *Conn) PasteQuery(
    req *requests.PasteQueryRequest,
) (responses.PasteQueryResponse, error)

PasteQuery calls the paste.query endpoint.

func (*Conn) PhrictionInfo Uses

func (c *Conn) PhrictionInfo(
    req requests.PhrictionInfoRequest,
) (*responses.PhrictionInfoResponse, error)

PhrictionInfo performs a call to phriction.info

func (*Conn) ProjectQuery Uses

func (c *Conn) ProjectQuery(
    req requests.ProjectQueryRequest,
) (*responses.ProjectQueryResponse, error)

ProjectQuery performs a call to project.query.

func (*Conn) RemarkupProcess Uses

func (c *Conn) RemarkupProcess(
    req requests.RemarkupProcessRequest,
) (*responses.RemarkupProcessResponse, error)

RemarkupProcess performs a call to remarkup.process

func (*Conn) RepositoryQuery Uses

func (c *Conn) RepositoryQuery(
    req requests.RepositoryQueryRequest,
) (*responses.RepositoryQueryResponse, error)

RepositoryQuery performs a call to repository.query.

func (*Conn) UserQuery Uses

func (c *Conn) UserQuery(
    req requests.UserQueryRequest,
) (*responses.UserQueryResponse, error)

UserQuery performs a call to differential.query.

type Dialer Uses

type Dialer struct {
    ClientName        string
    ClientVersion     string
    ClientDescription string

A Dialer contains options for connecting to an address.

func (*Dialer) Dial Uses

func (d *Dialer) Dial(
    host string,
    options *core.ClientOptions,
) (*Conn, error)

Dial connects to conduit and confirms the API capabilities for future calls.



Package gonduit imports 10 packages (graph) and is imported by 9 packages. Updated 2018-12-06. Refresh now. Tools for package owners.