mirror of
https://github.com/go-gitea/gitea.git
synced 2024-09-12 06:08:39 +02:00
* Dropped unused codekit config * Integrated dynamic and static bindata for public * Ignore public bindata * Add a general generate make task * Integrated flexible public assets into web command * Updated vendoring, added all missiong govendor deps * Made the linter happy with the bindata and dynamic code * Moved public bindata definition to modules directory * Ignoring the new bindata path now * Updated to the new public modules import path * Updated public bindata command and drop the new prefix
24 lines
528 B
Go
24 lines
528 B
Go
package etcd
|
|
|
|
// Add a new directory with a random etcd-generated key under the given path.
|
|
func (c *Client) AddChildDir(key string, ttl uint64) (*Response, error) {
|
|
raw, err := c.post(key, "", ttl)
|
|
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
|
|
return raw.Unmarshal()
|
|
}
|
|
|
|
// Add a new file with a random etcd-generated key under the given path.
|
|
func (c *Client) AddChild(key string, value string, ttl uint64) (*Response, error) {
|
|
raw, err := c.post(key, value, ttl)
|
|
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
|
|
return raw.Unmarshal()
|
|
}
|