1
0
mirror of https://github.com/drone/drone-cli.git synced 2024-11-23 01:11:57 +01:00

update secret endpoint

This commit is contained in:
Brad Rydzewski 2018-10-17 11:25:54 -07:00
parent c905c57f22
commit 2f5aa0ae26
4 changed files with 7 additions and 27 deletions

2
Gopkg.lock generated

@ -84,7 +84,7 @@
"plugin/logger",
"plugin/secret"
]
revision = "70af34cccf3c52890f3e4490e06f0bba2e2969c7"
revision = "d00b5c24549e5676acefedc4d5ef115471bf48eb"
[[projects]]
branch = "master"

@ -68,6 +68,7 @@ var secretFindCmd = cli.Command{
func secretFind(c *cli.Context) error {
path := c.Args().First()
key := c.Args().Get(1)
slug := c.String("repo")
owner, name, err := internal.ParseRepo(slug)
@ -91,7 +92,8 @@ func secretFind(c *cli.Context) error {
}
req := &secret.Request{
Name: path,
Path: path,
Name: key,
Repo: repo,
Build: build,
}
@ -105,7 +107,6 @@ func secretFind(c *cli.Context) error {
if err != nil {
return err
}
println(req.Name)
println(res.Data)
return nil
}

@ -148,8 +148,8 @@ type (
Version int64 `json:"version"`
}
// DEPRECATED
// Registry represents a docker registry with credentials.
// DEPRECATED
Registry struct {
Address string `json:"address"`
Username string `json:"username"`
@ -161,34 +161,12 @@ type (
// Secret represents a secret variable, such as a password or token.
Secret struct {
Name string `json:"name,omitempty"`
Data string `json:"data,omitempty"`
Pull bool `json:"pull,omitempty"`
Fork bool `json:"fork,omitempty"`
}
// // Activity represents an item in the user's feed or timeline.
// Activity struct {
// Owner string `json:"owner"`
// Name string `json:"name"`
// FullName string `json:"full_name"`
// Number int `json:"number,omitempty"`
// Event string `json:"event,omitempty"`
// Status string `json:"status,omitempty"`
// Created int64 `json:"created_at,omitempty"`
// Started int64 `json:"started_at,omitempty"`
// Finished int64 `json:"finished_at,omitempty"`
// Commit string `json:"commit,omitempty"`
// Branch string `json:"branch,omitempty"`
// Ref string `json:"ref,omitempty"`
// Refspec string `json:"refspec,omitempty"`
// Remote string `json:"remote,omitempty"`
// Title string `json:"title,omitempty"`
// Message string `json:"message,omitempty"`
// Author string `json:"author,omitempty"`
// Avatar string `json:"author_avatar,omitempty"`
// Email string `json:"author_email,omitempty"`
// }
// Server represents a server node.
Server struct {
ID string `json:"id"`

@ -26,6 +26,7 @@ const V1 = "application/vnd.drone.secret.v1+json"
type (
// Request defines a secret request.
Request struct {
Path string `json:"path"`
Name string `json:"name"`
Repo drone.Repo `json:"repo,omitempty"`
Build drone.Build `json:"build,omitempty"`