Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Connection ¶
type Connection struct {
// contains filtered or unexported fields
}
Connection is the handle for all access to the Gists
func NewConnection ¶
func NewConnection(pat string, gistid string) (*Connection, error)
NewConnection creates a new Connection to the listed gist, returning error if the id cannot be found
func (Connection) FindOne ¶
func (c Connection) FindOne(filename string) (string, error)
FindOne returns the single named file from the gist if it exists. Returns an error file doesn't exist
func (*Connection) Insert ¶
func (c *Connection) Insert(filename string, contents string) error
Insert adds a new file to the gist. Returns an error if the file already exists
func (*Connection) UpdateMany ¶
func (c *Connection) UpdateMany(files map[string]string) error
UpdateMany updates many files in the Gist at once. Warning this calls UpdateOne multiple times so is NOT idempotent
Click to show internal directories.
Click to hide internal directories.