id
int32
0
167k
repo
stringlengths
5
54
path
stringlengths
4
155
func_name
stringlengths
1
118
original_string
stringlengths
52
85.5k
language
stringclasses
1 value
code
stringlengths
52
85.5k
code_tokens
listlengths
21
1.41k
docstring
stringlengths
6
2.61k
docstring_tokens
listlengths
3
215
sha
stringlengths
40
40
url
stringlengths
85
252
19,800
cuigh/swirl
biz/docker/secret.go
SecretCreate
func SecretCreate(info *model.ConfigCreateInfo) error { return mgr.Do(func(ctx context.Context, cli *client.Client) (err error) { spec := swarm.SecretSpec{} spec.Name = info.Name if info.Base64 { spec.Data, err = base64.StdEncoding.DecodeString(info.Data) if err != nil { return } } else { spec....
go
func SecretCreate(info *model.ConfigCreateInfo) error { return mgr.Do(func(ctx context.Context, cli *client.Client) (err error) { spec := swarm.SecretSpec{} spec.Name = info.Name if info.Base64 { spec.Data, err = base64.StdEncoding.DecodeString(info.Data) if err != nil { return } } else { spec....
[ "func", "SecretCreate", "(", "info", "*", "model", ".", "ConfigCreateInfo", ")", "error", "{", "return", "mgr", ".", "Do", "(", "func", "(", "ctx", "context", ".", "Context", ",", "cli", "*", "client", ".", "Client", ")", "(", "err", "error", ")", "{...
// SecretCreate create a secret.
[ "SecretCreate", "create", "a", "secret", "." ]
9028e8ad445a1e501a11e5bd13491c270911c151
https://github.com/cuigh/swirl/blob/9028e8ad445a1e501a11e5bd13491c270911c151/biz/docker/secret.go#L39-L61
19,801
cuigh/swirl
biz/docker/secret.go
SecretUpdate
func SecretUpdate(info *model.ConfigUpdateInfo) error { return mgr.Do(func(ctx context.Context, cli *client.Client) (err error) { var secret swarm.Secret secret, _, err = cli.SecretInspectWithRaw(ctx, info.ID) if err != nil { return err } spec := secret.Spec // only the Labels field can be updated on A...
go
func SecretUpdate(info *model.ConfigUpdateInfo) error { return mgr.Do(func(ctx context.Context, cli *client.Client) (err error) { var secret swarm.Secret secret, _, err = cli.SecretInspectWithRaw(ctx, info.ID) if err != nil { return err } spec := secret.Spec // only the Labels field can be updated on A...
[ "func", "SecretUpdate", "(", "info", "*", "model", ".", "ConfigUpdateInfo", ")", "error", "{", "return", "mgr", ".", "Do", "(", "func", "(", "ctx", "context", ".", "Context", ",", "cli", "*", "client", ".", "Client", ")", "(", "err", "error", ")", "{...
// SecretUpdate update a config.
[ "SecretUpdate", "update", "a", "config", "." ]
9028e8ad445a1e501a11e5bd13491c270911c151
https://github.com/cuigh/swirl/blob/9028e8ad445a1e501a11e5bd13491c270911c151/biz/docker/secret.go#L64-L79
19,802
cuigh/swirl
biz/docker/secret.go
SecretInspect
func SecretInspect(id string) (secret swarm.Secret, raw []byte, err error) { var ( ctx context.Context cli *client.Client ) if ctx, cli, err = mgr.Client(); err == nil { secret, raw, err = cli.SecretInspectWithRaw(ctx, id) } return }
go
func SecretInspect(id string) (secret swarm.Secret, raw []byte, err error) { var ( ctx context.Context cli *client.Client ) if ctx, cli, err = mgr.Client(); err == nil { secret, raw, err = cli.SecretInspectWithRaw(ctx, id) } return }
[ "func", "SecretInspect", "(", "id", "string", ")", "(", "secret", "swarm", ".", "Secret", ",", "raw", "[", "]", "byte", ",", "err", "error", ")", "{", "var", "(", "ctx", "context", ".", "Context", "\n", "cli", "*", "client", ".", "Client", "\n", ")...
// SecretInspect returns secret information with raw data.
[ "SecretInspect", "returns", "secret", "information", "with", "raw", "data", "." ]
9028e8ad445a1e501a11e5bd13491c270911c151
https://github.com/cuigh/swirl/blob/9028e8ad445a1e501a11e5bd13491c270911c151/biz/docker/secret.go#L82-L91
19,803
cuigh/swirl
biz/docker/secret.go
SecretRemove
func SecretRemove(id string) error { return mgr.Do(func(ctx context.Context, cli *client.Client) (err error) { return cli.SecretRemove(ctx, id) }) }
go
func SecretRemove(id string) error { return mgr.Do(func(ctx context.Context, cli *client.Client) (err error) { return cli.SecretRemove(ctx, id) }) }
[ "func", "SecretRemove", "(", "id", "string", ")", "error", "{", "return", "mgr", ".", "Do", "(", "func", "(", "ctx", "context", ".", "Context", ",", "cli", "*", "client", ".", "Client", ")", "(", "err", "error", ")", "{", "return", "cli", ".", "Sec...
// SecretRemove remove a secret.
[ "SecretRemove", "remove", "a", "secret", "." ]
9028e8ad445a1e501a11e5bd13491c270911c151
https://github.com/cuigh/swirl/blob/9028e8ad445a1e501a11e5bd13491c270911c151/biz/docker/secret.go#L94-L98
19,804
cuigh/swirl
biz/docker/container.go
ContainerList
func ContainerList(args *model.ContainerListArgs) (infos []*model.ContainerListInfo, totalCount int, err error) { err = mgr.Do(func(ctx context.Context, cli *client.Client) (err error) { var ( containers []types.Container opts = types.ContainerListOptions{Filters: filters.NewArgs()} ) if args.Filter...
go
func ContainerList(args *model.ContainerListArgs) (infos []*model.ContainerListInfo, totalCount int, err error) { err = mgr.Do(func(ctx context.Context, cli *client.Client) (err error) { var ( containers []types.Container opts = types.ContainerListOptions{Filters: filters.NewArgs()} ) if args.Filter...
[ "func", "ContainerList", "(", "args", "*", "model", ".", "ContainerListArgs", ")", "(", "infos", "[", "]", "*", "model", ".", "ContainerListInfo", ",", "totalCount", "int", ",", "err", "error", ")", "{", "err", "=", "mgr", ".", "Do", "(", "func", "(", ...
// ContainerList return containers on the host.
[ "ContainerList", "return", "containers", "on", "the", "host", "." ]
9028e8ad445a1e501a11e5bd13491c270911c151
https://github.com/cuigh/swirl/blob/9028e8ad445a1e501a11e5bd13491c270911c151/biz/docker/container.go#L19-L53
19,805
cuigh/swirl
biz/docker/container.go
ContainerInspect
func ContainerInspect(id string) (container types.ContainerJSON, err error) { err = mgr.Do(func(ctx context.Context, cli *client.Client) (err error) { container, err = cli.ContainerInspect(ctx, id) return }) return }
go
func ContainerInspect(id string) (container types.ContainerJSON, err error) { err = mgr.Do(func(ctx context.Context, cli *client.Client) (err error) { container, err = cli.ContainerInspect(ctx, id) return }) return }
[ "func", "ContainerInspect", "(", "id", "string", ")", "(", "container", "types", ".", "ContainerJSON", ",", "err", "error", ")", "{", "err", "=", "mgr", ".", "Do", "(", "func", "(", "ctx", "context", ".", "Context", ",", "cli", "*", "client", ".", "C...
// ContainerInspect return detail information of a container.
[ "ContainerInspect", "return", "detail", "information", "of", "a", "container", "." ]
9028e8ad445a1e501a11e5bd13491c270911c151
https://github.com/cuigh/swirl/blob/9028e8ad445a1e501a11e5bd13491c270911c151/biz/docker/container.go#L56-L62
19,806
cuigh/swirl
biz/docker/container.go
ContainerInspectRaw
func ContainerInspectRaw(id string) (container types.ContainerJSON, raw []byte, err error) { var ( ctx context.Context cli *client.Client ) if ctx, cli, err = mgr.Client(); err == nil { container, raw, err = cli.ContainerInspectWithRaw(ctx, id, true) } return }
go
func ContainerInspectRaw(id string) (container types.ContainerJSON, raw []byte, err error) { var ( ctx context.Context cli *client.Client ) if ctx, cli, err = mgr.Client(); err == nil { container, raw, err = cli.ContainerInspectWithRaw(ctx, id, true) } return }
[ "func", "ContainerInspectRaw", "(", "id", "string", ")", "(", "container", "types", ".", "ContainerJSON", ",", "raw", "[", "]", "byte", ",", "err", "error", ")", "{", "var", "(", "ctx", "context", ".", "Context", "\n", "cli", "*", "client", ".", "Clien...
// ContainerInspectRaw return container raw information.
[ "ContainerInspectRaw", "return", "container", "raw", "information", "." ]
9028e8ad445a1e501a11e5bd13491c270911c151
https://github.com/cuigh/swirl/blob/9028e8ad445a1e501a11e5bd13491c270911c151/biz/docker/container.go#L65-L74
19,807
cuigh/swirl
biz/docker/container.go
ContainerRemove
func ContainerRemove(id string) error { return mgr.Do(func(ctx context.Context, cli *client.Client) (err error) { opts := types.ContainerRemoveOptions{} err = cli.ContainerRemove(ctx, id, opts) return }) }
go
func ContainerRemove(id string) error { return mgr.Do(func(ctx context.Context, cli *client.Client) (err error) { opts := types.ContainerRemoveOptions{} err = cli.ContainerRemove(ctx, id, opts) return }) }
[ "func", "ContainerRemove", "(", "id", "string", ")", "error", "{", "return", "mgr", ".", "Do", "(", "func", "(", "ctx", "context", ".", "Context", ",", "cli", "*", "client", ".", "Client", ")", "(", "err", "error", ")", "{", "opts", ":=", "types", ...
// ContainerRemove remove a container.
[ "ContainerRemove", "remove", "a", "container", "." ]
9028e8ad445a1e501a11e5bd13491c270911c151
https://github.com/cuigh/swirl/blob/9028e8ad445a1e501a11e5bd13491c270911c151/biz/docker/container.go#L77-L83
19,808
cuigh/swirl
biz/docker/container.go
ContainerExecCreate
func ContainerExecCreate(id string, cmd string) (resp types.IDResponse, err error) { err = mgr.Do(func(ctx context.Context, cli *client.Client) (err error) { opts := types.ExecConfig{ AttachStdin: true, AttachStdout: true, AttachStderr: true, Tty: true, //User: "root", Cmd: strings.Split(...
go
func ContainerExecCreate(id string, cmd string) (resp types.IDResponse, err error) { err = mgr.Do(func(ctx context.Context, cli *client.Client) (err error) { opts := types.ExecConfig{ AttachStdin: true, AttachStdout: true, AttachStderr: true, Tty: true, //User: "root", Cmd: strings.Split(...
[ "func", "ContainerExecCreate", "(", "id", "string", ",", "cmd", "string", ")", "(", "resp", "types", ".", "IDResponse", ",", "err", "error", ")", "{", "err", "=", "mgr", ".", "Do", "(", "func", "(", "ctx", "context", ".", "Context", ",", "cli", "*", ...
// ContainerExecCreate creates an exec instance.
[ "ContainerExecCreate", "creates", "an", "exec", "instance", "." ]
9028e8ad445a1e501a11e5bd13491c270911c151
https://github.com/cuigh/swirl/blob/9028e8ad445a1e501a11e5bd13491c270911c151/biz/docker/container.go#L116-L131
19,809
cuigh/swirl
biz/docker/container.go
ContainerExecAttach
func ContainerExecAttach(id string) (resp types.HijackedResponse, err error) { err = mgr.Do(func(ctx context.Context, cli *client.Client) (err error) { opts := types.ExecStartCheck{ Detach: false, Tty: true, } resp, err = cli.ContainerExecAttach(ctx, id, opts) return err }) return }
go
func ContainerExecAttach(id string) (resp types.HijackedResponse, err error) { err = mgr.Do(func(ctx context.Context, cli *client.Client) (err error) { opts := types.ExecStartCheck{ Detach: false, Tty: true, } resp, err = cli.ContainerExecAttach(ctx, id, opts) return err }) return }
[ "func", "ContainerExecAttach", "(", "id", "string", ")", "(", "resp", "types", ".", "HijackedResponse", ",", "err", "error", ")", "{", "err", "=", "mgr", ".", "Do", "(", "func", "(", "ctx", "context", ".", "Context", ",", "cli", "*", "client", ".", "...
// ContainerExecAttach attaches a connection to an exec process in the server.
[ "ContainerExecAttach", "attaches", "a", "connection", "to", "an", "exec", "process", "in", "the", "server", "." ]
9028e8ad445a1e501a11e5bd13491c270911c151
https://github.com/cuigh/swirl/blob/9028e8ad445a1e501a11e5bd13491c270911c151/biz/docker/container.go#L134-L144
19,810
cuigh/swirl
biz/docker/container.go
ContainerExecStart
func ContainerExecStart(id string) error { return mgr.Do(func(ctx context.Context, cli *client.Client) (err error) { opts := types.ExecStartCheck{ Detach: false, Tty: true, } return cli.ContainerExecStart(ctx, id, opts) }) }
go
func ContainerExecStart(id string) error { return mgr.Do(func(ctx context.Context, cli *client.Client) (err error) { opts := types.ExecStartCheck{ Detach: false, Tty: true, } return cli.ContainerExecStart(ctx, id, opts) }) }
[ "func", "ContainerExecStart", "(", "id", "string", ")", "error", "{", "return", "mgr", ".", "Do", "(", "func", "(", "ctx", "context", ".", "Context", ",", "cli", "*", "client", ".", "Client", ")", "(", "err", "error", ")", "{", "opts", ":=", "types",...
// ContainerExecStart starts an exec instance.
[ "ContainerExecStart", "starts", "an", "exec", "instance", "." ]
9028e8ad445a1e501a11e5bd13491c270911c151
https://github.com/cuigh/swirl/blob/9028e8ad445a1e501a11e5bd13491c270911c151/biz/docker/container.go#L147-L155
19,811
cuigh/swirl
dao/mongo/stack.go
StackMigrate
func (d *Dao) StackMigrate() { d.do(func(db *database) { logger := log.Get(app.Name) archiveColl := db.C("archive") // check collection is exists. if _, err := archiveColl.Indexes(); err != nil { return } archives := make([]*model.Archive, 0) err := archiveColl.Find(nil).All(&archives) if err != n...
go
func (d *Dao) StackMigrate() { d.do(func(db *database) { logger := log.Get(app.Name) archiveColl := db.C("archive") // check collection is exists. if _, err := archiveColl.Indexes(); err != nil { return } archives := make([]*model.Archive, 0) err := archiveColl.Find(nil).All(&archives) if err != n...
[ "func", "(", "d", "*", "Dao", ")", "StackMigrate", "(", ")", "{", "d", ".", "do", "(", "func", "(", "db", "*", "database", ")", "{", "logger", ":=", "log", ".", "Get", "(", "app", ".", "Name", ")", "\n", "archiveColl", ":=", "db", ".", "C", "...
// StackMigrate migrates stacks from old archive collection.
[ "StackMigrate", "migrates", "stacks", "from", "old", "archive", "collection", "." ]
9028e8ad445a1e501a11e5bd13491c270911c151
https://github.com/cuigh/swirl/blob/9028e8ad445a1e501a11e5bd13491c270911c151/dao/mongo/stack.go#L66-L113
19,812
cuigh/swirl
controller/image.go
Image
func Image() (c *ImageController) { return &ImageController{ List: imageList, Detail: imageDetail, Raw: imageRaw, Delete: imageDelete, } }
go
func Image() (c *ImageController) { return &ImageController{ List: imageList, Detail: imageDetail, Raw: imageRaw, Delete: imageDelete, } }
[ "func", "Image", "(", ")", "(", "c", "*", "ImageController", ")", "{", "return", "&", "ImageController", "{", "List", ":", "imageList", ",", "Detail", ":", "imageDetail", ",", "Raw", ":", "imageRaw", ",", "Delete", ":", "imageDelete", ",", "}", "\n", "...
// Image creates an instance of ImageController
[ "Image", "creates", "an", "instance", "of", "ImageController" ]
9028e8ad445a1e501a11e5bd13491c270911c151
https://github.com/cuigh/swirl/blob/9028e8ad445a1e501a11e5bd13491c270911c151/controller/image.go#L22-L29
19,813
cuigh/swirl
misc/misc.go
BindOptions
func BindOptions() { config.BindEnv(keyDockerEndpoint, envDockerEndpoint) config.BindEnv(keyDockerAPIVersion, envDockerAPIVersion) config.BindEnv(keyDBType, envDBType) config.BindEnv(keyDBAddress, envDBAddress) config.BindEnv(keyAuthTimeout, envAuthTimeout) }
go
func BindOptions() { config.BindEnv(keyDockerEndpoint, envDockerEndpoint) config.BindEnv(keyDockerAPIVersion, envDockerAPIVersion) config.BindEnv(keyDBType, envDBType) config.BindEnv(keyDBAddress, envDBAddress) config.BindEnv(keyAuthTimeout, envAuthTimeout) }
[ "func", "BindOptions", "(", ")", "{", "config", ".", "BindEnv", "(", "keyDockerEndpoint", ",", "envDockerEndpoint", ")", "\n", "config", ".", "BindEnv", "(", "keyDockerAPIVersion", ",", "envDockerAPIVersion", ")", "\n", "config", ".", "BindEnv", "(", "keyDBType"...
// BindOptions binds options to environment variables.
[ "BindOptions", "binds", "options", "to", "environment", "variables", "." ]
9028e8ad445a1e501a11e5bd13491c270911c151
https://github.com/cuigh/swirl/blob/9028e8ad445a1e501a11e5bd13491c270911c151/misc/misc.go#L68-L74
19,814
cuigh/swirl
biz/docker/task.go
TaskList
func TaskList(args *model.TaskListArgs) (infos []*model.TaskInfo, totalCount int, err error) { err = mgr.Do(func(ctx context.Context, cli *client.Client) (err error) { var ( tasks []swarm.Task opts = types.TaskListOptions{ Filters: filters.NewArgs(), } ) if args.PageIndex < 1 { args.PageIndex =...
go
func TaskList(args *model.TaskListArgs) (infos []*model.TaskInfo, totalCount int, err error) { err = mgr.Do(func(ctx context.Context, cli *client.Client) (err error) { var ( tasks []swarm.Task opts = types.TaskListOptions{ Filters: filters.NewArgs(), } ) if args.PageIndex < 1 { args.PageIndex =...
[ "func", "TaskList", "(", "args", "*", "model", ".", "TaskListArgs", ")", "(", "infos", "[", "]", "*", "model", ".", "TaskInfo", ",", "totalCount", "int", ",", "err", "error", ")", "{", "err", "=", "mgr", ".", "Do", "(", "func", "(", "ctx", "context...
// TaskList return all running tasks of a service or a node.
[ "TaskList", "return", "all", "running", "tasks", "of", "a", "service", "or", "a", "node", "." ]
9028e8ad445a1e501a11e5bd13491c270911c151
https://github.com/cuigh/swirl/blob/9028e8ad445a1e501a11e5bd13491c270911c151/biz/docker/task.go#L21-L81
19,815
cuigh/swirl
biz/docker/task.go
TaskInspect
func TaskInspect(id string) (task swarm.Task, raw []byte, err error) { err = mgr.Do(func(ctx context.Context, cli *client.Client) (err error) { task, raw, err = cli.TaskInspectWithRaw(ctx, id) return }) return }
go
func TaskInspect(id string) (task swarm.Task, raw []byte, err error) { err = mgr.Do(func(ctx context.Context, cli *client.Client) (err error) { task, raw, err = cli.TaskInspectWithRaw(ctx, id) return }) return }
[ "func", "TaskInspect", "(", "id", "string", ")", "(", "task", "swarm", ".", "Task", ",", "raw", "[", "]", "byte", ",", "err", "error", ")", "{", "err", "=", "mgr", ".", "Do", "(", "func", "(", "ctx", "context", ".", "Context", ",", "cli", "*", ...
// TaskInspect return detail information of a task.
[ "TaskInspect", "return", "detail", "information", "of", "a", "task", "." ]
9028e8ad445a1e501a11e5bd13491c270911c151
https://github.com/cuigh/swirl/blob/9028e8ad445a1e501a11e5bd13491c270911c151/biz/docker/task.go#L84-L90
19,816
cuigh/swirl
biz/docker/task.go
TaskLogs
func TaskLogs(id string, line int, timestamps bool) (stdout, stderr *bytes.Buffer, err error) { var ( ctx context.Context cli *client.Client rc io.ReadCloser ) ctx, cli, err = mgr.Client() if err != nil { return } opts := types.ContainerLogsOptions{ ShowStdout: true, ShowStderr: true, Tail: ...
go
func TaskLogs(id string, line int, timestamps bool) (stdout, stderr *bytes.Buffer, err error) { var ( ctx context.Context cli *client.Client rc io.ReadCloser ) ctx, cli, err = mgr.Client() if err != nil { return } opts := types.ContainerLogsOptions{ ShowStdout: true, ShowStderr: true, Tail: ...
[ "func", "TaskLogs", "(", "id", "string", ",", "line", "int", ",", "timestamps", "bool", ")", "(", "stdout", ",", "stderr", "*", "bytes", ".", "Buffer", ",", "err", "error", ")", "{", "var", "(", "ctx", "context", ".", "Context", "\n", "cli", "*", "...
// TaskLogs returns the logs generated by a task in an io.ReadCloser. // It's up to the caller to close the stream.
[ "TaskLogs", "returns", "the", "logs", "generated", "by", "a", "task", "in", "an", "io", ".", "ReadCloser", ".", "It", "s", "up", "to", "the", "caller", "to", "close", "the", "stream", "." ]
9028e8ad445a1e501a11e5bd13491c270911c151
https://github.com/cuigh/swirl/blob/9028e8ad445a1e501a11e5bd13491c270911c151/biz/docker/task.go#L94-L121
19,817
cuigh/swirl
scaler/scaler.go
Start
func Start() { const labelScale = "swirl.scale" run.Schedule(time.Minute, func() { args := filters.NewArgs() args.Add("mode", "replicated") args.Add("label", labelScale) services, err := docker.ServiceSearch(args) if err != nil { log.Get("scaler").Error("scaler > Failed to search service: ", err) ret...
go
func Start() { const labelScale = "swirl.scale" run.Schedule(time.Minute, func() { args := filters.NewArgs() args.Add("mode", "replicated") args.Add("label", labelScale) services, err := docker.ServiceSearch(args) if err != nil { log.Get("scaler").Error("scaler > Failed to search service: ", err) ret...
[ "func", "Start", "(", ")", "{", "const", "labelScale", "=", "\"", "\"", "\n\n", "run", ".", "Schedule", "(", "time", ".", "Minute", ",", "func", "(", ")", "{", "args", ":=", "filters", ".", "NewArgs", "(", ")", "\n", "args", ".", "Add", "(", "\""...
// Start starts a timer to scale services automatically.
[ "Start", "starts", "a", "timer", "to", "scale", "services", "automatically", "." ]
9028e8ad445a1e501a11e5bd13491c270911c151
https://github.com/cuigh/swirl/blob/9028e8ad445a1e501a11e5bd13491c270911c151/scaler/scaler.go#L41-L60
19,818
cuigh/swirl
controller/container.go
Container
func Container() (c *ContainerController) { return &ContainerController{ List: containerList, Detail: containerDetail, Raw: containerRaw, Logs: containerLogs, FetchLogs: containerFetchLogs, Delete: containerDelete, Exec: containerExec, Connect: containerConnect, } }
go
func Container() (c *ContainerController) { return &ContainerController{ List: containerList, Detail: containerDetail, Raw: containerRaw, Logs: containerLogs, FetchLogs: containerFetchLogs, Delete: containerDelete, Exec: containerExec, Connect: containerConnect, } }
[ "func", "Container", "(", ")", "(", "c", "*", "ContainerController", ")", "{", "return", "&", "ContainerController", "{", "List", ":", "containerList", ",", "Detail", ":", "containerDetail", ",", "Raw", ":", "containerRaw", ",", "Logs", ":", "containerLogs", ...
// Container creates an instance of ContainerController
[ "Container", "creates", "an", "instance", "of", "ContainerController" ]
9028e8ad445a1e501a11e5bd13491c270911c151
https://github.com/cuigh/swirl/blob/9028e8ad445a1e501a11e5bd13491c270911c151/controller/container.go#L31-L42
19,819
cuigh/swirl
dao/dao.go
Get
func Get() (Interface, error) { v, err := value.Get() if err != nil { return nil, err } return v.(Interface), nil }
go
func Get() (Interface, error) { v, err := value.Get() if err != nil { return nil, err } return v.(Interface), nil }
[ "func", "Get", "(", ")", "(", "Interface", ",", "error", ")", "{", "v", ",", "err", ":=", "value", ".", "Get", "(", ")", "\n", "if", "err", "!=", "nil", "{", "return", "nil", ",", "err", "\n", "}", "\n", "return", "v", ".", "(", "Interface", ...
// Get return a dao instance according to DB_TYPE.
[ "Get", "return", "a", "dao", "instance", "according", "to", "DB_TYPE", "." ]
9028e8ad445a1e501a11e5bd13491c270911c151
https://github.com/cuigh/swirl/blob/9028e8ad445a1e501a11e5bd13491c270911c151/dao/dao.go#L84-L90
19,820
cuigh/swirl
controller/chart.go
Chart
func Chart() (c *ChartController) { return &ChartController{ List: chartList, Query: chartQuery, New: chartNew, Create: chartCreate, Detail: chartDetail, Edit: chartEdit, Update: chartUpdate, Delete: chartDelete, Data: chartData...
go
func Chart() (c *ChartController) { return &ChartController{ List: chartList, Query: chartQuery, New: chartNew, Create: chartCreate, Detail: chartDetail, Edit: chartEdit, Update: chartUpdate, Delete: chartDelete, Data: chartData...
[ "func", "Chart", "(", ")", "(", "c", "*", "ChartController", ")", "{", "return", "&", "ChartController", "{", "List", ":", "chartList", ",", "Query", ":", "chartQuery", ",", "New", ":", "chartNew", ",", "Create", ":", "chartCreate", ",", "Detail", ":", ...
// Chart creates an instance of RoleController
[ "Chart", "creates", "an", "instance", "of", "RoleController" ]
9028e8ad445a1e501a11e5bd13491c270911c151
https://github.com/cuigh/swirl/blob/9028e8ad445a1e501a11e5bd13491c270911c151/controller/chart.go#L30-L43
19,821
cuigh/swirl
controller/user.go
User
func User() (c *UserController) { return &UserController{ Index: userIndex, New: userNew, Create: userCreate, Detail: userDetail, Edit: userEdit, Update: userUpdate, Block: userBlock, Unblock: userUnblock, Delete: userDelete, Search: userSearch, } }
go
func User() (c *UserController) { return &UserController{ Index: userIndex, New: userNew, Create: userCreate, Detail: userDetail, Edit: userEdit, Update: userUpdate, Block: userBlock, Unblock: userUnblock, Delete: userDelete, Search: userSearch, } }
[ "func", "User", "(", ")", "(", "c", "*", "UserController", ")", "{", "return", "&", "UserController", "{", "Index", ":", "userIndex", ",", "New", ":", "userNew", ",", "Create", ":", "userCreate", ",", "Detail", ":", "userDetail", ",", "Edit", ":", "use...
// User creates an instance of UserController
[ "User", "creates", "an", "instance", "of", "UserController" ]
9028e8ad445a1e501a11e5bd13491c270911c151
https://github.com/cuigh/swirl/blob/9028e8ad445a1e501a11e5bd13491c270911c151/controller/user.go#L26-L39
19,822
cuigh/swirl
biz/docker/stack.go
StackList
func StackList() (stacks []*model.Stack, err error) { err = mgr.Do(func(ctx context.Context, cli *client.Client) (err error) { var services []swarm.Service opts := types.ServiceListOptions{ Filters: filters.NewArgs(), } opts.Filters.Add("label", stackLabel) services, err = cli.ServiceList(ctx, opts) if ...
go
func StackList() (stacks []*model.Stack, err error) { err = mgr.Do(func(ctx context.Context, cli *client.Client) (err error) { var services []swarm.Service opts := types.ServiceListOptions{ Filters: filters.NewArgs(), } opts.Filters.Add("label", stackLabel) services, err = cli.ServiceList(ctx, opts) if ...
[ "func", "StackList", "(", ")", "(", "stacks", "[", "]", "*", "model", ".", "Stack", ",", "err", "error", ")", "{", "err", "=", "mgr", ".", "Do", "(", "func", "(", "ctx", "context", ".", "Context", ",", "cli", "*", "client", ".", "Client", ")", ...
// StackList return all stacks.
[ "StackList", "return", "all", "stacks", "." ]
9028e8ad445a1e501a11e5bd13491c270911c151
https://github.com/cuigh/swirl/blob/9028e8ad445a1e501a11e5bd13491c270911c151/biz/docker/stack.go#L21-L61
19,823
cuigh/swirl
biz/docker/stack.go
StackCount
func StackCount() (count int, err error) { err = mgr.Do(func(ctx context.Context, cli *client.Client) (err error) { var services []swarm.Service opts := types.ServiceListOptions{ Filters: filters.NewArgs(), } opts.Filters.Add("label", stackLabel) services, err = cli.ServiceList(ctx, opts) if err != nil ...
go
func StackCount() (count int, err error) { err = mgr.Do(func(ctx context.Context, cli *client.Client) (err error) { var services []swarm.Service opts := types.ServiceListOptions{ Filters: filters.NewArgs(), } opts.Filters.Add("label", stackLabel) services, err = cli.ServiceList(ctx, opts) if err != nil ...
[ "func", "StackCount", "(", ")", "(", "count", "int", ",", "err", "error", ")", "{", "err", "=", "mgr", ".", "Do", "(", "func", "(", "ctx", "context", ".", "Context", ",", "cli", "*", "client", ".", "Client", ")", "(", "err", "error", ")", "{", ...
// StackCount return number of stacks.
[ "StackCount", "return", "number", "of", "stacks", "." ]
9028e8ad445a1e501a11e5bd13491c270911c151
https://github.com/cuigh/swirl/blob/9028e8ad445a1e501a11e5bd13491c270911c151/biz/docker/stack.go#L64-L89
19,824
cuigh/swirl
biz/docker/stack.go
StackDeploy
func StackDeploy(name, content string, authes map[string]string) error { ctx, cli, err := mgr.Client() if err != nil { return err } cfg, err := compose.Parse(name, content) if err != nil { return err } namespace := compose.NewNamespace(name) serviceNetworks := compose.GetServicesDeclaredNetworks(cfg.Serv...
go
func StackDeploy(name, content string, authes map[string]string) error { ctx, cli, err := mgr.Client() if err != nil { return err } cfg, err := compose.Parse(name, content) if err != nil { return err } namespace := compose.NewNamespace(name) serviceNetworks := compose.GetServicesDeclaredNetworks(cfg.Serv...
[ "func", "StackDeploy", "(", "name", ",", "content", "string", ",", "authes", "map", "[", "string", "]", "string", ")", "error", "{", "ctx", ",", "cli", ",", "err", ":=", "mgr", ".", "Client", "(", ")", "\n", "if", "err", "!=", "nil", "{", "return",...
// StackDeploy deploy a stack.
[ "StackDeploy", "deploy", "a", "stack", "." ]
9028e8ad445a1e501a11e5bd13491c270911c151
https://github.com/cuigh/swirl/blob/9028e8ad445a1e501a11e5bd13491c270911c151/biz/docker/stack.go#L176-L219
19,825
cuigh/swirl
controller/config.go
Config
func Config() (c *ConfigController) { return &ConfigController{ List: configList, Delete: configDelete, New: configNew, Create: configCreate, Edit: configEdit, Update: configUpdate, } }
go
func Config() (c *ConfigController) { return &ConfigController{ List: configList, Delete: configDelete, New: configNew, Create: configCreate, Edit: configEdit, Update: configUpdate, } }
[ "func", "Config", "(", ")", "(", "c", "*", "ConfigController", ")", "{", "return", "&", "ConfigController", "{", "List", ":", "configList", ",", "Delete", ":", "configDelete", ",", "New", ":", "configNew", ",", "Create", ":", "configCreate", ",", "Edit", ...
// Config creates an instance of ConfigController
[ "Config", "creates", "an", "instance", "of", "ConfigController" ]
9028e8ad445a1e501a11e5bd13491c270911c151
https://github.com/cuigh/swirl/blob/9028e8ad445a1e501a11e5bd13491c270911c151/controller/config.go#L24-L33
19,826
cuigh/swirl
controller/volume.go
Volume
func Volume() (c *VolumeController) { return &VolumeController{ List: volumeList, New: volumeNew, Create: volumeCreate, Delete: volumeDelete, Prune: volumePrune, Detail: volumeDetail, Raw: volumeRaw, } }
go
func Volume() (c *VolumeController) { return &VolumeController{ List: volumeList, New: volumeNew, Create: volumeCreate, Delete: volumeDelete, Prune: volumePrune, Detail: volumeDetail, Raw: volumeRaw, } }
[ "func", "Volume", "(", ")", "(", "c", "*", "VolumeController", ")", "{", "return", "&", "VolumeController", "{", "List", ":", "volumeList", ",", "New", ":", "volumeNew", ",", "Create", ":", "volumeCreate", ",", "Delete", ":", "volumeDelete", ",", "Prune", ...
// Volume creates an instance of VolumeController
[ "Volume", "creates", "an", "instance", "of", "VolumeController" ]
9028e8ad445a1e501a11e5bd13491c270911c151
https://github.com/cuigh/swirl/blob/9028e8ad445a1e501a11e5bd13491c270911c151/controller/volume.go#L26-L36
19,827
cuigh/swirl
controller/task.go
Task
func Task() (c *TaskController) { return &TaskController{ List: taskList, Detail: taskDetail, Raw: taskRaw, Logs: taskLogs, FetchLogs: taskFetchLogs, } }
go
func Task() (c *TaskController) { return &TaskController{ List: taskList, Detail: taskDetail, Raw: taskRaw, Logs: taskLogs, FetchLogs: taskFetchLogs, } }
[ "func", "Task", "(", ")", "(", "c", "*", "TaskController", ")", "{", "return", "&", "TaskController", "{", "List", ":", "taskList", ",", "Detail", ":", "taskDetail", ",", "Raw", ":", "taskRaw", ",", "Logs", ":", "taskLogs", ",", "FetchLogs", ":", "task...
// Task creates an instance of TaskController
[ "Task", "creates", "an", "instance", "of", "TaskController" ]
9028e8ad445a1e501a11e5bd13491c270911c151
https://github.com/cuigh/swirl/blob/9028e8ad445a1e501a11e5bd13491c270911c151/controller/task.go#L22-L30
19,828
cuigh/swirl
security/auth.go
Validator
func Validator(setting *model.Setting) func(name, pwd string) (ticket string, err error) { ldapRealm := createLDAPRealm(setting) return func(name, pwd string) (ticket string, err error) { var ( su security.User mu *model.User ) // try find user first mu, err = biz.User.GetByName(name) if err != nil {...
go
func Validator(setting *model.Setting) func(name, pwd string) (ticket string, err error) { ldapRealm := createLDAPRealm(setting) return func(name, pwd string) (ticket string, err error) { var ( su security.User mu *model.User ) // try find user first mu, err = biz.User.GetByName(name) if err != nil {...
[ "func", "Validator", "(", "setting", "*", "model", ".", "Setting", ")", "func", "(", "name", ",", "pwd", "string", ")", "(", "ticket", "string", ",", "err", "error", ")", "{", "ldapRealm", ":=", "createLDAPRealm", "(", "setting", ")", "\n", "return", "...
// Validator is the authenticator function of swirl.
[ "Validator", "is", "the", "authenticator", "function", "of", "swirl", "." ]
9028e8ad445a1e501a11e5bd13491c270911c151
https://github.com/cuigh/swirl/blob/9028e8ad445a1e501a11e5bd13491c270911c151/security/auth.go#L20-L69
19,829
cuigh/swirl
security/auth.go
Identifier
func Identifier(token string) (user web.User) { const cacheKey = "auth_user" session, err := biz.User.GetSession(token) if err != nil { log.Get(pkgName).Errorf("Load session failed: %v", err) return } if session == nil || session.Expires.Before(time.Now()) { return } // try find from cache first value :...
go
func Identifier(token string) (user web.User) { const cacheKey = "auth_user" session, err := biz.User.GetSession(token) if err != nil { log.Get(pkgName).Errorf("Load session failed: %v", err) return } if session == nil || session.Expires.Before(time.Now()) { return } // try find from cache first value :...
[ "func", "Identifier", "(", "token", "string", ")", "(", "user", "web", ".", "User", ")", "{", "const", "cacheKey", "=", "\"", "\"", "\n\n", "session", ",", "err", ":=", "biz", ".", "User", ".", "GetSession", "(", "token", ")", "\n", "if", "err", "!...
// Identifier is used to identity user.
[ "Identifier", "is", "used", "to", "identity", "user", "." ]
9028e8ad445a1e501a11e5bd13491c270911c151
https://github.com/cuigh/swirl/blob/9028e8ad445a1e501a11e5bd13491c270911c151/security/auth.go#L88-L125
19,830
cuigh/swirl
controller/stack.go
Stack
func Stack() (c *StackController) { return &StackController{ List: stackList, New: stackNew, Create: stackCreate, Detail: stackDetail, Edit: stackEdit, Update: stackUpdate, Deploy: stackDeploy, Shutdown: stackShutdown, Delete: stackDelete, } }
go
func Stack() (c *StackController) { return &StackController{ List: stackList, New: stackNew, Create: stackCreate, Detail: stackDetail, Edit: stackEdit, Update: stackUpdate, Deploy: stackDeploy, Shutdown: stackShutdown, Delete: stackDelete, } }
[ "func", "Stack", "(", ")", "(", "c", "*", "StackController", ")", "{", "return", "&", "StackController", "{", "List", ":", "stackList", ",", "New", ":", "stackNew", ",", "Create", ":", "stackCreate", ",", "Detail", ":", "stackDetail", ",", "Edit", ":", ...
// Stack creates an instance of StackController
[ "Stack", "creates", "an", "instance", "of", "StackController" ]
9028e8ad445a1e501a11e5bd13491c270911c151
https://github.com/cuigh/swirl/blob/9028e8ad445a1e501a11e5bd13491c270911c151/controller/stack.go#L25-L37
19,831
cuigh/swirl
biz/docker/service.go
ServiceSearch
func ServiceSearch(args filters.Args) (services []swarm.Service, err error) { // nolint: gocyclo err = mgr.Do(func(ctx context.Context, cli *client.Client) (err error) { opts := types.ServiceListOptions{Filters: args} services, err = cli.ServiceList(ctx, opts) return }) return }
go
func ServiceSearch(args filters.Args) (services []swarm.Service, err error) { // nolint: gocyclo err = mgr.Do(func(ctx context.Context, cli *client.Client) (err error) { opts := types.ServiceListOptions{Filters: args} services, err = cli.ServiceList(ctx, opts) return }) return }
[ "func", "ServiceSearch", "(", "args", "filters", ".", "Args", ")", "(", "services", "[", "]", "swarm", ".", "Service", ",", "err", "error", ")", "{", "// nolint: gocyclo", "err", "=", "mgr", ".", "Do", "(", "func", "(", "ctx", "context", ".", "Context"...
// ServiceSearch search services with args.
[ "ServiceSearch", "search", "services", "with", "args", "." ]
9028e8ad445a1e501a11e5bd13491c270911c151
https://github.com/cuigh/swirl/blob/9028e8ad445a1e501a11e5bd13491c270911c151/biz/docker/service.go#L106-L113
19,832
cuigh/swirl
biz/docker/service.go
ServiceCount
func ServiceCount() (count int, err error) { err = mgr.Do(func(ctx context.Context, cli *client.Client) (err error) { var services []swarm.Service if services, err = cli.ServiceList(ctx, types.ServiceListOptions{}); err == nil { count = len(services) } return }) return }
go
func ServiceCount() (count int, err error) { err = mgr.Do(func(ctx context.Context, cli *client.Client) (err error) { var services []swarm.Service if services, err = cli.ServiceList(ctx, types.ServiceListOptions{}); err == nil { count = len(services) } return }) return }
[ "func", "ServiceCount", "(", ")", "(", "count", "int", ",", "err", "error", ")", "{", "err", "=", "mgr", ".", "Do", "(", "func", "(", "ctx", "context", ".", "Context", ",", "cli", "*", "client", ".", "Client", ")", "(", "err", "error", ")", "{", ...
// ServiceCount return number of services.
[ "ServiceCount", "return", "number", "of", "services", "." ]
9028e8ad445a1e501a11e5bd13491c270911c151
https://github.com/cuigh/swirl/blob/9028e8ad445a1e501a11e5bd13491c270911c151/biz/docker/service.go#L116-L125
19,833
cuigh/swirl
biz/docker/service.go
ServiceInspect
func ServiceInspect(name string) (service swarm.Service, raw []byte, err error) { err = mgr.Do(func(ctx context.Context, cli *client.Client) (err error) { service, raw, err = cli.ServiceInspectWithRaw(ctx, name, types.ServiceInspectOptions{}) return }) return }
go
func ServiceInspect(name string) (service swarm.Service, raw []byte, err error) { err = mgr.Do(func(ctx context.Context, cli *client.Client) (err error) { service, raw, err = cli.ServiceInspectWithRaw(ctx, name, types.ServiceInspectOptions{}) return }) return }
[ "func", "ServiceInspect", "(", "name", "string", ")", "(", "service", "swarm", ".", "Service", ",", "raw", "[", "]", "byte", ",", "err", "error", ")", "{", "err", "=", "mgr", ".", "Do", "(", "func", "(", "ctx", "context", ".", "Context", ",", "cli"...
// ServiceInspect return service raw information.
[ "ServiceInspect", "return", "service", "raw", "information", "." ]
9028e8ad445a1e501a11e5bd13491c270911c151
https://github.com/cuigh/swirl/blob/9028e8ad445a1e501a11e5bd13491c270911c151/biz/docker/service.go#L128-L134
19,834
cuigh/swirl
biz/docker/service.go
ServiceScale
func ServiceScale(name string, version, count uint64) error { return mgr.Do(func(ctx context.Context, cli *client.Client) (err error) { service, _, err := cli.ServiceInspectWithRaw(ctx, name, types.ServiceInspectOptions{}) if err != nil { return err } spec := service.Spec if spec.Mode.Replicated == nil {...
go
func ServiceScale(name string, version, count uint64) error { return mgr.Do(func(ctx context.Context, cli *client.Client) (err error) { service, _, err := cli.ServiceInspectWithRaw(ctx, name, types.ServiceInspectOptions{}) if err != nil { return err } spec := service.Spec if spec.Mode.Replicated == nil {...
[ "func", "ServiceScale", "(", "name", "string", ",", "version", ",", "count", "uint64", ")", "error", "{", "return", "mgr", ".", "Do", "(", "func", "(", "ctx", "context", ".", "Context", ",", "cli", "*", "client", ".", "Client", ")", "(", "err", "erro...
// ServiceScale adjust replicas of a service.
[ "ServiceScale", "adjust", "replicas", "of", "a", "service", "." ]
9028e8ad445a1e501a11e5bd13491c270911c151
https://github.com/cuigh/swirl/blob/9028e8ad445a1e501a11e5bd13491c270911c151/biz/docker/service.go#L342-L365
19,835
cuigh/swirl
biz/docker/service.go
ServiceRollback
func ServiceRollback(name string) error { return mgr.Do(func(ctx context.Context, cli *client.Client) (err error) { service, _, err := cli.ServiceInspectWithRaw(ctx, name, types.ServiceInspectOptions{}) if err != nil { return err } options := types.ServiceUpdateOptions{ Rollback: "previous", } resp,...
go
func ServiceRollback(name string) error { return mgr.Do(func(ctx context.Context, cli *client.Client) (err error) { service, _, err := cli.ServiceInspectWithRaw(ctx, name, types.ServiceInspectOptions{}) if err != nil { return err } options := types.ServiceUpdateOptions{ Rollback: "previous", } resp,...
[ "func", "ServiceRollback", "(", "name", "string", ")", "error", "{", "return", "mgr", ".", "Do", "(", "func", "(", "ctx", "context", ".", "Context", ",", "cli", "*", "client", ".", "Client", ")", "(", "err", "error", ")", "{", "service", ",", "_", ...
// ServiceRollback rollbacks a service.
[ "ServiceRollback", "rollbacks", "a", "service", "." ]
9028e8ad445a1e501a11e5bd13491c270911c151
https://github.com/cuigh/swirl/blob/9028e8ad445a1e501a11e5bd13491c270911c151/biz/docker/service.go#L734-L750
19,836
cuigh/swirl
biz/docker/network.go
NetworkList
func NetworkList() (networks []types.NetworkResource, err error) { err = mgr.Do(func(ctx context.Context, cli *client.Client) (err error) { networks, err = cli.NetworkList(ctx, types.NetworkListOptions{}) if err == nil { sort.Slice(networks, func(i, j int) bool { return networks[i].Name < networks[j].Name ...
go
func NetworkList() (networks []types.NetworkResource, err error) { err = mgr.Do(func(ctx context.Context, cli *client.Client) (err error) { networks, err = cli.NetworkList(ctx, types.NetworkListOptions{}) if err == nil { sort.Slice(networks, func(i, j int) bool { return networks[i].Name < networks[j].Name ...
[ "func", "NetworkList", "(", ")", "(", "networks", "[", "]", "types", ".", "NetworkResource", ",", "err", "error", ")", "{", "err", "=", "mgr", ".", "Do", "(", "func", "(", "ctx", "context", ".", "Context", ",", "cli", "*", "client", ".", "Client", ...
// NetworkList return all networks.
[ "NetworkList", "return", "all", "networks", "." ]
9028e8ad445a1e501a11e5bd13491c270911c151
https://github.com/cuigh/swirl/blob/9028e8ad445a1e501a11e5bd13491c270911c151/biz/docker/network.go#L14-L25
19,837
cuigh/swirl
biz/docker/network.go
NetworkCount
func NetworkCount() (count int, err error) { err = mgr.Do(func(ctx context.Context, cli *client.Client) (err error) { var networks []types.NetworkResource networks, err = cli.NetworkList(ctx, types.NetworkListOptions{}) if err == nil { count = len(networks) } return }) return }
go
func NetworkCount() (count int, err error) { err = mgr.Do(func(ctx context.Context, cli *client.Client) (err error) { var networks []types.NetworkResource networks, err = cli.NetworkList(ctx, types.NetworkListOptions{}) if err == nil { count = len(networks) } return }) return }
[ "func", "NetworkCount", "(", ")", "(", "count", "int", ",", "err", "error", ")", "{", "err", "=", "mgr", ".", "Do", "(", "func", "(", "ctx", "context", ".", "Context", ",", "cli", "*", "client", ".", "Client", ")", "(", "err", "error", ")", "{", ...
// NetworkCount return number of networks.
[ "NetworkCount", "return", "number", "of", "networks", "." ]
9028e8ad445a1e501a11e5bd13491c270911c151
https://github.com/cuigh/swirl/blob/9028e8ad445a1e501a11e5bd13491c270911c151/biz/docker/network.go#L28-L38
19,838
cuigh/swirl
biz/docker/network.go
NetworkCreate
func NetworkCreate(info *model.NetworkCreateInfo) error { return mgr.Do(func(ctx context.Context, cli *client.Client) (err error) { var ( resp types.NetworkCreateResponse options = types.NetworkCreate{ Internal: info.Internal, Attachable: info.Attachable, IPAM: &network.IPAM{}, Enabl...
go
func NetworkCreate(info *model.NetworkCreateInfo) error { return mgr.Do(func(ctx context.Context, cli *client.Client) (err error) { var ( resp types.NetworkCreateResponse options = types.NetworkCreate{ Internal: info.Internal, Attachable: info.Attachable, IPAM: &network.IPAM{}, Enabl...
[ "func", "NetworkCreate", "(", "info", "*", "model", ".", "NetworkCreateInfo", ")", "error", "{", "return", "mgr", ".", "Do", "(", "func", "(", "ctx", "context", ".", "Context", ",", "cli", "*", "client", ".", "Client", ")", "(", "err", "error", ")", ...
// NetworkCreate create a network.
[ "NetworkCreate", "create", "a", "network", "." ]
9028e8ad445a1e501a11e5bd13491c270911c151
https://github.com/cuigh/swirl/blob/9028e8ad445a1e501a11e5bd13491c270911c151/biz/docker/network.go#L41-L84
19,839
cuigh/swirl
biz/docker/network.go
NetworkDisconnect
func NetworkDisconnect(name, container string) error { return mgr.Do(func(ctx context.Context, cli *client.Client) (err error) { return cli.NetworkDisconnect(ctx, name, container, false) }) }
go
func NetworkDisconnect(name, container string) error { return mgr.Do(func(ctx context.Context, cli *client.Client) (err error) { return cli.NetworkDisconnect(ctx, name, container, false) }) }
[ "func", "NetworkDisconnect", "(", "name", ",", "container", "string", ")", "error", "{", "return", "mgr", ".", "Do", "(", "func", "(", "ctx", "context", ".", "Context", ",", "cli", "*", "client", ".", "Client", ")", "(", "err", "error", ")", "{", "re...
// NetworkDisconnect Disconnect a container from a network.
[ "NetworkDisconnect", "Disconnect", "a", "container", "from", "a", "network", "." ]
9028e8ad445a1e501a11e5bd13491c270911c151
https://github.com/cuigh/swirl/blob/9028e8ad445a1e501a11e5bd13491c270911c151/biz/docker/network.go#L94-L98
19,840
cuigh/swirl
biz/docker/network.go
NetworkInspect
func NetworkInspect(name string) (network types.NetworkResource, err error) { var ( ctx context.Context cli *client.Client ) if ctx, cli, err = mgr.Client(); err == nil { network, err = cli.NetworkInspect(ctx, name, types.NetworkInspectOptions{}) } return }
go
func NetworkInspect(name string) (network types.NetworkResource, err error) { var ( ctx context.Context cli *client.Client ) if ctx, cli, err = mgr.Client(); err == nil { network, err = cli.NetworkInspect(ctx, name, types.NetworkInspectOptions{}) } return }
[ "func", "NetworkInspect", "(", "name", "string", ")", "(", "network", "types", ".", "NetworkResource", ",", "err", "error", ")", "{", "var", "(", "ctx", "context", ".", "Context", "\n", "cli", "*", "client", ".", "Client", "\n", ")", "\n", "if", "ctx",...
// NetworkInspect return network information.
[ "NetworkInspect", "return", "network", "information", "." ]
9028e8ad445a1e501a11e5bd13491c270911c151
https://github.com/cuigh/swirl/blob/9028e8ad445a1e501a11e5bd13491c270911c151/biz/docker/network.go#L101-L110
19,841
cuigh/swirl
biz/docker/network.go
NetworkInspectRaw
func NetworkInspectRaw(name string) (raw []byte, err error) { var ( ctx context.Context cli *client.Client ) if ctx, cli, err = mgr.Client(); err == nil { _, raw, err = cli.NetworkInspectWithRaw(ctx, name, types.NetworkInspectOptions{}) } return }
go
func NetworkInspectRaw(name string) (raw []byte, err error) { var ( ctx context.Context cli *client.Client ) if ctx, cli, err = mgr.Client(); err == nil { _, raw, err = cli.NetworkInspectWithRaw(ctx, name, types.NetworkInspectOptions{}) } return }
[ "func", "NetworkInspectRaw", "(", "name", "string", ")", "(", "raw", "[", "]", "byte", ",", "err", "error", ")", "{", "var", "(", "ctx", "context", ".", "Context", "\n", "cli", "*", "client", ".", "Client", "\n", ")", "\n", "if", "ctx", ",", "cli",...
// NetworkInspectRaw return network raw information.
[ "NetworkInspectRaw", "return", "network", "raw", "information", "." ]
9028e8ad445a1e501a11e5bd13491c270911c151
https://github.com/cuigh/swirl/blob/9028e8ad445a1e501a11e5bd13491c270911c151/biz/docker/network.go#L113-L122
19,842
cuigh/swirl
biz/docker/network.go
NetworkNames
func NetworkNames(ids ...string) (names []string, err error) { var ( ctx context.Context cli *client.Client ) if ctx, cli, err = mgr.Client(); err == nil { for _, id := range ids { var n types.NetworkResource n, err = cli.NetworkInspect(ctx, id, types.NetworkInspectOptions{}) if err != nil { break...
go
func NetworkNames(ids ...string) (names []string, err error) { var ( ctx context.Context cli *client.Client ) if ctx, cli, err = mgr.Client(); err == nil { for _, id := range ids { var n types.NetworkResource n, err = cli.NetworkInspect(ctx, id, types.NetworkInspectOptions{}) if err != nil { break...
[ "func", "NetworkNames", "(", "ids", "...", "string", ")", "(", "names", "[", "]", "string", ",", "err", "error", ")", "{", "var", "(", "ctx", "context", ".", "Context", "\n", "cli", "*", "client", ".", "Client", "\n", ")", "\n", "if", "ctx", ",", ...
// NetworkNames return network names by id list.
[ "NetworkNames", "return", "network", "names", "by", "id", "list", "." ]
9028e8ad445a1e501a11e5bd13491c270911c151
https://github.com/cuigh/swirl/blob/9028e8ad445a1e501a11e5bd13491c270911c151/biz/docker/network.go#L125-L141
19,843
gobwas/glob
util/runes/runes.go
IndexAny
func IndexAny(s, chars []rune) int { if len(chars) > 0 { for i, c := range s { for _, m := range chars { if c == m { return i } } } } return -1 }
go
func IndexAny(s, chars []rune) int { if len(chars) > 0 { for i, c := range s { for _, m := range chars { if c == m { return i } } } } return -1 }
[ "func", "IndexAny", "(", "s", ",", "chars", "[", "]", "rune", ")", "int", "{", "if", "len", "(", "chars", ")", ">", "0", "{", "for", "i", ",", "c", ":=", "range", "s", "{", "for", "_", ",", "m", ":=", "range", "chars", "{", "if", "c", "==",...
// IndexAny returns the index of the first instance of any Unicode code point // from chars in s, or -1 if no Unicode code point from chars is present in s.
[ "IndexAny", "returns", "the", "index", "of", "the", "first", "instance", "of", "any", "Unicode", "code", "point", "from", "chars", "in", "s", "or", "-", "1", "if", "no", "Unicode", "code", "point", "from", "chars", "is", "present", "in", "s", "." ]
e7a84e9525fe90abcda167b604e483cc959ad4aa
https://github.com/gobwas/glob/blob/e7a84e9525fe90abcda167b604e483cc959ad4aa/util/runes/runes.go#L70-L81
19,844
gobwas/glob
util/runes/runes.go
HasPrefix
func HasPrefix(s, prefix []rune) bool { return len(s) >= len(prefix) && Equal(s[0:len(prefix)], prefix) }
go
func HasPrefix(s, prefix []rune) bool { return len(s) >= len(prefix) && Equal(s[0:len(prefix)], prefix) }
[ "func", "HasPrefix", "(", "s", ",", "prefix", "[", "]", "rune", ")", "bool", "{", "return", "len", "(", "s", ")", ">=", "len", "(", "prefix", ")", "&&", "Equal", "(", "s", "[", "0", ":", "len", "(", "prefix", ")", "]", ",", "prefix", ")", "\n...
// HasPrefix tests whether the string s begins with prefix.
[ "HasPrefix", "tests", "whether", "the", "string", "s", "begins", "with", "prefix", "." ]
e7a84e9525fe90abcda167b604e483cc959ad4aa
https://github.com/gobwas/glob/blob/e7a84e9525fe90abcda167b604e483cc959ad4aa/util/runes/runes.go#L147-L149
19,845
gobwas/glob
util/runes/runes.go
HasSuffix
func HasSuffix(s, suffix []rune) bool { return len(s) >= len(suffix) && Equal(s[len(s)-len(suffix):], suffix) }
go
func HasSuffix(s, suffix []rune) bool { return len(s) >= len(suffix) && Equal(s[len(s)-len(suffix):], suffix) }
[ "func", "HasSuffix", "(", "s", ",", "suffix", "[", "]", "rune", ")", "bool", "{", "return", "len", "(", "s", ")", ">=", "len", "(", "suffix", ")", "&&", "Equal", "(", "s", "[", "len", "(", "s", ")", "-", "len", "(", "suffix", ")", ":", "]", ...
// HasSuffix tests whether the string s ends with suffix.
[ "HasSuffix", "tests", "whether", "the", "string", "s", "ends", "with", "suffix", "." ]
e7a84e9525fe90abcda167b604e483cc959ad4aa
https://github.com/gobwas/glob/blob/e7a84e9525fe90abcda167b604e483cc959ad4aa/util/runes/runes.go#L152-L154
19,846
gobwas/glob
glob.go
MustCompile
func MustCompile(pattern string, separators ...rune) Glob { g, err := Compile(pattern, separators...) if err != nil { panic(err) } return g }
go
func MustCompile(pattern string, separators ...rune) Glob { g, err := Compile(pattern, separators...) if err != nil { panic(err) } return g }
[ "func", "MustCompile", "(", "pattern", "string", ",", "separators", "...", "rune", ")", "Glob", "{", "g", ",", "err", ":=", "Compile", "(", "pattern", ",", "separators", "...", ")", "\n", "if", "err", "!=", "nil", "{", "panic", "(", "err", ")", "\n",...
// MustCompile is the same as Compile, except that if Compile returns error, this will panic
[ "MustCompile", "is", "the", "same", "as", "Compile", "except", "that", "if", "Compile", "returns", "error", "this", "will", "panic" ]
e7a84e9525fe90abcda167b604e483cc959ad4aa
https://github.com/gobwas/glob/blob/e7a84e9525fe90abcda167b604e483cc959ad4aa/glob.go#L54-L61
19,847
gobwas/glob
compiler/compiler.go
minimizeTree
func minimizeTree(tree *ast.Node) *ast.Node { switch tree.Kind { case ast.KindAnyOf: return minimizeTreeAnyOf(tree) default: return nil } }
go
func minimizeTree(tree *ast.Node) *ast.Node { switch tree.Kind { case ast.KindAnyOf: return minimizeTreeAnyOf(tree) default: return nil } }
[ "func", "minimizeTree", "(", "tree", "*", "ast", ".", "Node", ")", "*", "ast", ".", "Node", "{", "switch", "tree", ".", "Kind", "{", "case", "ast", ".", "KindAnyOf", ":", "return", "minimizeTreeAnyOf", "(", "tree", ")", "\n", "default", ":", "return", ...
// minimizeAnyOf tries to apply some heuristics to minimize number of nodes in given tree
[ "minimizeAnyOf", "tries", "to", "apply", "some", "heuristics", "to", "minimize", "number", "of", "nodes", "in", "given", "tree" ]
e7a84e9525fe90abcda167b604e483cc959ad4aa
https://github.com/gobwas/glob/blob/e7a84e9525fe90abcda167b604e483cc959ad4aa/compiler/compiler.go#L303-L310
19,848
gobwas/glob
match/match.go
appendMerge
func appendMerge(target, sub []int) []int { lt, ls := len(target), len(sub) out := make([]int, 0, lt+ls) for x, y := 0, 0; x < lt || y < ls; { if x >= lt { out = append(out, sub[y:]...) break } if y >= ls { out = append(out, target[x:]...) break } xValue := target[x] yValue := sub[y] sw...
go
func appendMerge(target, sub []int) []int { lt, ls := len(target), len(sub) out := make([]int, 0, lt+ls) for x, y := 0, 0; x < lt || y < ls; { if x >= lt { out = append(out, sub[y:]...) break } if y >= ls { out = append(out, target[x:]...) break } xValue := target[x] yValue := sub[y] sw...
[ "func", "appendMerge", "(", "target", ",", "sub", "[", "]", "int", ")", "[", "]", "int", "{", "lt", ",", "ls", ":=", "len", "(", "target", ")", ",", "len", "(", "sub", ")", "\n", "out", ":=", "make", "(", "[", "]", "int", ",", "0", ",", "lt...
// appendMerge merges and sorts given already SORTED and UNIQUE segments.
[ "appendMerge", "merges", "and", "sorts", "given", "already", "SORTED", "and", "UNIQUE", "segments", "." ]
e7a84e9525fe90abcda167b604e483cc959ad4aa
https://github.com/gobwas/glob/blob/e7a84e9525fe90abcda167b604e483cc959ad4aa/match/match.go#L33-L72
19,849
teris-io/shortid
shortid.go
GetDefault
func GetDefault() *Shortid { return (*Shortid)(atomic.LoadPointer((*unsafe.Pointer)(unsafe.Pointer(&shortid)))) }
go
func GetDefault() *Shortid { return (*Shortid)(atomic.LoadPointer((*unsafe.Pointer)(unsafe.Pointer(&shortid)))) }
[ "func", "GetDefault", "(", ")", "*", "Shortid", "{", "return", "(", "*", "Shortid", ")", "(", "atomic", ".", "LoadPointer", "(", "(", "*", "unsafe", ".", "Pointer", ")", "(", "unsafe", ".", "Pointer", "(", "&", "shortid", ")", ")", ")", ")", "\n", ...
// GetDefault retrieves the default short Id generator initialised with the default alphabet, // worker=0 and seed=1. The default can be overwritten using SetDefault.
[ "GetDefault", "retrieves", "the", "default", "short", "Id", "generator", "initialised", "with", "the", "default", "alphabet", "worker", "=", "0", "and", "seed", "=", "1", ".", "The", "default", "can", "be", "overwritten", "using", "SetDefault", "." ]
771a37caa5cf0c81f585d7b6df4dfc77e0615b5c
https://github.com/teris-io/shortid/blob/771a37caa5cf0c81f585d7b6df4dfc77e0615b5c/shortid.go#L111-L113
19,850
teris-io/shortid
shortid.go
SetDefault
func SetDefault(sid *Shortid) { target := (*unsafe.Pointer)(unsafe.Pointer(&shortid)) source := unsafe.Pointer(sid) atomic.SwapPointer(target, source) }
go
func SetDefault(sid *Shortid) { target := (*unsafe.Pointer)(unsafe.Pointer(&shortid)) source := unsafe.Pointer(sid) atomic.SwapPointer(target, source) }
[ "func", "SetDefault", "(", "sid", "*", "Shortid", ")", "{", "target", ":=", "(", "*", "unsafe", ".", "Pointer", ")", "(", "unsafe", ".", "Pointer", "(", "&", "shortid", ")", ")", "\n", "source", ":=", "unsafe", ".", "Pointer", "(", "sid", ")", "\n"...
// SetDefault overwrites the default generator.
[ "SetDefault", "overwrites", "the", "default", "generator", "." ]
771a37caa5cf0c81f585d7b6df4dfc77e0615b5c
https://github.com/teris-io/shortid/blob/771a37caa5cf0c81f585d7b6df4dfc77e0615b5c/shortid.go#L116-L120
19,851
teris-io/shortid
shortid.go
MustNew
func MustNew(worker uint8, alphabet string, seed uint64) *Shortid { sid, err := New(worker, alphabet, seed) if err == nil { return sid } panic(err) }
go
func MustNew(worker uint8, alphabet string, seed uint64) *Shortid { sid, err := New(worker, alphabet, seed) if err == nil { return sid } panic(err) }
[ "func", "MustNew", "(", "worker", "uint8", ",", "alphabet", "string", ",", "seed", "uint64", ")", "*", "Shortid", "{", "sid", ",", "err", ":=", "New", "(", "worker", ",", "alphabet", ",", "seed", ")", "\n", "if", "err", "==", "nil", "{", "return", ...
// MustNew acts just like New, but panics instead of returning errors.
[ "MustNew", "acts", "just", "like", "New", "but", "panics", "instead", "of", "returning", "errors", "." ]
771a37caa5cf0c81f585d7b6df4dfc77e0615b5c
https://github.com/teris-io/shortid/blob/771a37caa5cf0c81f585d7b6df4dfc77e0615b5c/shortid.go#L159-L165
19,852
teris-io/shortid
shortid.go
Generate
func (sid *Shortid) Generate() (string, error) { return sid.GenerateInternal(nil, sid.epoch) }
go
func (sid *Shortid) Generate() (string, error) { return sid.GenerateInternal(nil, sid.epoch) }
[ "func", "(", "sid", "*", "Shortid", ")", "Generate", "(", ")", "(", "string", ",", "error", ")", "{", "return", "sid", ".", "GenerateInternal", "(", "nil", ",", "sid", ".", "epoch", ")", "\n", "}" ]
// Generate generates a new short Id.
[ "Generate", "generates", "a", "new", "short", "Id", "." ]
771a37caa5cf0c81f585d7b6df4dfc77e0615b5c
https://github.com/teris-io/shortid/blob/771a37caa5cf0c81f585d7b6df4dfc77e0615b5c/shortid.go#L168-L170
19,853
teris-io/shortid
shortid.go
GenerateInternal
func (sid *Shortid) GenerateInternal(tm *time.Time, epoch time.Time) (string, error) { ms, count := sid.getMsAndCounter(tm, epoch) idrunes := make([]rune, 9) if tmp, err := sid.abc.Encode(ms, 8, 5); err == nil { copy(idrunes, tmp) // first 8 symbols } else { return "", err } if tmp, err := sid.abc.Encode(sid....
go
func (sid *Shortid) GenerateInternal(tm *time.Time, epoch time.Time) (string, error) { ms, count := sid.getMsAndCounter(tm, epoch) idrunes := make([]rune, 9) if tmp, err := sid.abc.Encode(ms, 8, 5); err == nil { copy(idrunes, tmp) // first 8 symbols } else { return "", err } if tmp, err := sid.abc.Encode(sid....
[ "func", "(", "sid", "*", "Shortid", ")", "GenerateInternal", "(", "tm", "*", "time", ".", "Time", ",", "epoch", "time", ".", "Time", ")", "(", "string", ",", "error", ")", "{", "ms", ",", "count", ":=", "sid", ".", "getMsAndCounter", "(", "tm", ","...
// GenerateInternal should only be used for testing purposes.
[ "GenerateInternal", "should", "only", "be", "used", "for", "testing", "purposes", "." ]
771a37caa5cf0c81f585d7b6df4dfc77e0615b5c
https://github.com/teris-io/shortid/blob/771a37caa5cf0c81f585d7b6df4dfc77e0615b5c/shortid.go#L182-L204
19,854
teris-io/shortid
shortid.go
String
func (sid *Shortid) String() string { return fmt.Sprintf("Shortid(worker=%v, epoch=%v, abc=%v)", sid.worker, sid.epoch, sid.abc) }
go
func (sid *Shortid) String() string { return fmt.Sprintf("Shortid(worker=%v, epoch=%v, abc=%v)", sid.worker, sid.epoch, sid.abc) }
[ "func", "(", "sid", "*", "Shortid", ")", "String", "(", ")", "string", "{", "return", "fmt", ".", "Sprintf", "(", "\"", "\"", ",", "sid", ".", "worker", ",", "sid", ".", "epoch", ",", "sid", ".", "abc", ")", "\n", "}" ]
// String returns a string representation of the short Id generator.
[ "String", "returns", "a", "string", "representation", "of", "the", "short", "Id", "generator", "." ]
771a37caa5cf0c81f585d7b6df4dfc77e0615b5c
https://github.com/teris-io/shortid/blob/771a37caa5cf0c81f585d7b6df4dfc77e0615b5c/shortid.go#L225-L227
19,855
teris-io/shortid
shortid.go
NewAbc
func NewAbc(alphabet string, seed uint64) (Abc, error) { runes := []rune(alphabet) if len(runes) != len(DefaultABC) { return Abc{}, fmt.Errorf("alphabet must contain %v unique characters", len(DefaultABC)) } if nonUnique(runes) { return Abc{}, errors.New("alphabet must contain unique characters only") } abc :...
go
func NewAbc(alphabet string, seed uint64) (Abc, error) { runes := []rune(alphabet) if len(runes) != len(DefaultABC) { return Abc{}, fmt.Errorf("alphabet must contain %v unique characters", len(DefaultABC)) } if nonUnique(runes) { return Abc{}, errors.New("alphabet must contain unique characters only") } abc :...
[ "func", "NewAbc", "(", "alphabet", "string", ",", "seed", "uint64", ")", "(", "Abc", ",", "error", ")", "{", "runes", ":=", "[", "]", "rune", "(", "alphabet", ")", "\n", "if", "len", "(", "runes", ")", "!=", "len", "(", "DefaultABC", ")", "{", "r...
// NewAbc constructs a new instance of shuffled alphabet to be used for Id representation.
[ "NewAbc", "constructs", "a", "new", "instance", "of", "shuffled", "alphabet", "to", "be", "used", "for", "Id", "representation", "." ]
771a37caa5cf0c81f585d7b6df4dfc77e0615b5c
https://github.com/teris-io/shortid/blob/771a37caa5cf0c81f585d7b6df4dfc77e0615b5c/shortid.go#L246-L257
19,856
teris-io/shortid
shortid.go
MustNewAbc
func MustNewAbc(alphabet string, seed uint64) Abc { res, err := NewAbc(alphabet, seed) if err == nil { return res } panic(err) }
go
func MustNewAbc(alphabet string, seed uint64) Abc { res, err := NewAbc(alphabet, seed) if err == nil { return res } panic(err) }
[ "func", "MustNewAbc", "(", "alphabet", "string", ",", "seed", "uint64", ")", "Abc", "{", "res", ",", "err", ":=", "NewAbc", "(", "alphabet", ",", "seed", ")", "\n", "if", "err", "==", "nil", "{", "return", "res", "\n", "}", "\n", "panic", "(", "err...
// MustNewAbc acts just like NewAbc, but panics instead of returning errors.
[ "MustNewAbc", "acts", "just", "like", "NewAbc", "but", "panics", "instead", "of", "returning", "errors", "." ]
771a37caa5cf0c81f585d7b6df4dfc77e0615b5c
https://github.com/teris-io/shortid/blob/771a37caa5cf0c81f585d7b6df4dfc77e0615b5c/shortid.go#L260-L266
19,857
teris-io/shortid
shortid.go
MustEncode
func (abc *Abc) MustEncode(val, size, digits uint) []rune { res, err := abc.Encode(val, size, digits) if err == nil { return res } panic(err) }
go
func (abc *Abc) MustEncode(val, size, digits uint) []rune { res, err := abc.Encode(val, size, digits) if err == nil { return res } panic(err) }
[ "func", "(", "abc", "*", "Abc", ")", "MustEncode", "(", "val", ",", "size", ",", "digits", "uint", ")", "[", "]", "rune", "{", "res", ",", "err", ":=", "abc", ".", "Encode", "(", "val", ",", "size", ",", "digits", ")", "\n", "if", "err", "==", ...
// MustEncode acts just like Encode, but panics instead of returning errors.
[ "MustEncode", "acts", "just", "like", "Encode", "but", "panics", "instead", "of", "returning", "errors", "." ]
771a37caa5cf0c81f585d7b6df4dfc77e0615b5c
https://github.com/teris-io/shortid/blob/771a37caa5cf0c81f585d7b6df4dfc77e0615b5c/shortid.go#L331-L337
19,858
sercand/kuberesolver
stream.go
newStreamWatcher
func newStreamWatcher(r io.ReadCloser) watchInterface { sw := &streamWatcher{ r: r, decoder: json.NewDecoder(r), result: make(chan Event), } go sw.receive() return sw }
go
func newStreamWatcher(r io.ReadCloser) watchInterface { sw := &streamWatcher{ r: r, decoder: json.NewDecoder(r), result: make(chan Event), } go sw.receive() return sw }
[ "func", "newStreamWatcher", "(", "r", "io", ".", "ReadCloser", ")", "watchInterface", "{", "sw", ":=", "&", "streamWatcher", "{", "r", ":", "r", ",", "decoder", ":", "json", ".", "NewDecoder", "(", "r", ")", ",", "result", ":", "make", "(", "chan", "...
// NewStreamWatcher creates a StreamWatcher from the given io.ReadClosers.
[ "NewStreamWatcher", "creates", "a", "StreamWatcher", "from", "the", "given", "io", ".", "ReadClosers", "." ]
93f6fd85e473ae1b5f538428345c038d26572fa8
https://github.com/sercand/kuberesolver/blob/93f6fd85e473ae1b5f538428345c038d26572fa8/stream.go#L35-L43
19,859
sercand/kuberesolver
builder.go
NewBuilder
func NewBuilder(client K8sClient, schema string) resolver.Builder { return &kubeBuilder{ k8sClient: client, schema: schema, } }
go
func NewBuilder(client K8sClient, schema string) resolver.Builder { return &kubeBuilder{ k8sClient: client, schema: schema, } }
[ "func", "NewBuilder", "(", "client", "K8sClient", ",", "schema", "string", ")", "resolver", ".", "Builder", "{", "return", "&", "kubeBuilder", "{", "k8sClient", ":", "client", ",", "schema", ":", "schema", ",", "}", "\n", "}" ]
// NewBuilder creates a kubeBuilder which is used to factory Kuberesolvers.
[ "NewBuilder", "creates", "a", "kubeBuilder", "which", "is", "used", "to", "factory", "Kuberesolvers", "." ]
93f6fd85e473ae1b5f538428345c038d26572fa8
https://github.com/sercand/kuberesolver/blob/93f6fd85e473ae1b5f538428345c038d26572fa8/builder.go#L63-L68
19,860
sercand/kuberesolver
builder.go
Build
func (b *kubeBuilder) Build(target resolver.Target, cc resolver.ClientConn, opts resolver.BuildOption) (resolver.Resolver, error) { if b.k8sClient == nil { if cl, err := NewInClusterK8sClient(); err == nil { b.k8sClient = cl } else { return nil, err } } ti, err := parseResolverTarget(target) if err != n...
go
func (b *kubeBuilder) Build(target resolver.Target, cc resolver.ClientConn, opts resolver.BuildOption) (resolver.Resolver, error) { if b.k8sClient == nil { if cl, err := NewInClusterK8sClient(); err == nil { b.k8sClient = cl } else { return nil, err } } ti, err := parseResolverTarget(target) if err != n...
[ "func", "(", "b", "*", "kubeBuilder", ")", "Build", "(", "target", "resolver", ".", "Target", ",", "cc", "resolver", ".", "ClientConn", ",", "opts", "resolver", ".", "BuildOption", ")", "(", "resolver", ".", "Resolver", ",", "error", ")", "{", "if", "b...
// Build creates a new resolver for the given target. // // gRPC dial calls Build synchronously, and fails if the returned error is // not nil.
[ "Build", "creates", "a", "new", "resolver", "for", "the", "given", "target", ".", "gRPC", "dial", "calls", "Build", "synchronously", "and", "fails", "if", "the", "returned", "error", "is", "not", "nil", "." ]
93f6fd85e473ae1b5f538428345c038d26572fa8
https://github.com/sercand/kuberesolver/blob/93f6fd85e473ae1b5f538428345c038d26572fa8/builder.go#L131-L165
19,861
sercand/kuberesolver
kubernetes.go
NewInClusterK8sClient
func NewInClusterK8sClient() (K8sClient, error) { host, port := os.Getenv("KUBERNETES_SERVICE_HOST"), os.Getenv("KUBERNETES_SERVICE_PORT") if len(host) == 0 || len(port) == 0 { return nil, fmt.Errorf("unable to load in-cluster configuration, KUBERNETES_SERVICE_HOST and KUBERNETES_SERVICE_PORT must be defined") } ...
go
func NewInClusterK8sClient() (K8sClient, error) { host, port := os.Getenv("KUBERNETES_SERVICE_HOST"), os.Getenv("KUBERNETES_SERVICE_PORT") if len(host) == 0 || len(port) == 0 { return nil, fmt.Errorf("unable to load in-cluster configuration, KUBERNETES_SERVICE_HOST and KUBERNETES_SERVICE_PORT must be defined") } ...
[ "func", "NewInClusterK8sClient", "(", ")", "(", "K8sClient", ",", "error", ")", "{", "host", ",", "port", ":=", "os", ".", "Getenv", "(", "\"", "\"", ")", ",", "os", ".", "Getenv", "(", "\"", "\"", ")", "\n", "if", "len", "(", "host", ")", "==", ...
// NewInClusterK8sClient creates K8sClient if it is inside Kubernetes
[ "NewInClusterK8sClient", "creates", "K8sClient", "if", "it", "is", "inside", "Kubernetes" ]
93f6fd85e473ae1b5f538428345c038d26572fa8
https://github.com/sercand/kuberesolver/blob/93f6fd85e473ae1b5f538428345c038d26572fa8/kubernetes.go#L58-L84
19,862
sercand/kuberesolver
kubernetes.go
NewInsecureK8sClient
func NewInsecureK8sClient(apiURL string) K8sClient { return &k8sClient{ host: apiURL, httpClient: http.DefaultClient, } }
go
func NewInsecureK8sClient(apiURL string) K8sClient { return &k8sClient{ host: apiURL, httpClient: http.DefaultClient, } }
[ "func", "NewInsecureK8sClient", "(", "apiURL", "string", ")", "K8sClient", "{", "return", "&", "k8sClient", "{", "host", ":", "apiURL", ",", "httpClient", ":", "http", ".", "DefaultClient", ",", "}", "\n", "}" ]
// NewInsecureK8sClient creates an insecure k8s client which is suitable // to connect kubernetes api behind proxy
[ "NewInsecureK8sClient", "creates", "an", "insecure", "k8s", "client", "which", "is", "suitable", "to", "connect", "kubernetes", "api", "behind", "proxy" ]
93f6fd85e473ae1b5f538428345c038d26572fa8
https://github.com/sercand/kuberesolver/blob/93f6fd85e473ae1b5f538428345c038d26572fa8/kubernetes.go#L88-L93
19,863
heroku/heroku-go
v3/heroku.go
NewService
func NewService(c *http.Client) *Service { if c == nil { c = http.DefaultClient } return &Service{ client: c, URL: DefaultURL, } }
go
func NewService(c *http.Client) *Service { if c == nil { c = http.DefaultClient } return &Service{ client: c, URL: DefaultURL, } }
[ "func", "NewService", "(", "c", "*", "http", ".", "Client", ")", "*", "Service", "{", "if", "c", "==", "nil", "{", "c", "=", "http", ".", "DefaultClient", "\n", "}", "\n", "return", "&", "Service", "{", "client", ":", "c", ",", "URL", ":", "Defau...
// NewService creates a Service using the given, if none is provided // it uses http.DefaultClient.
[ "NewService", "creates", "a", "Service", "using", "the", "given", "if", "none", "is", "provided", "it", "uses", "http", ".", "DefaultClient", "." ]
ad17585a922f269c393cbccf2e0cf81eb8d2e431
https://github.com/heroku/heroku-go/blob/ad17585a922f269c393cbccf2e0cf81eb8d2e431/v3/heroku.go#L41-L49
19,864
heroku/heroku-go
v3/heroku.go
NewRequest
func (s *Service) NewRequest(ctx context.Context, method, path string, body interface{}, q interface{}) (*http.Request, error) { var ctype string var rbody io.Reader switch t := body.(type) { case nil: case string: rbody = bytes.NewBufferString(t) case io.Reader: rbody = t default: v := reflect.ValueOf(bod...
go
func (s *Service) NewRequest(ctx context.Context, method, path string, body interface{}, q interface{}) (*http.Request, error) { var ctype string var rbody io.Reader switch t := body.(type) { case nil: case string: rbody = bytes.NewBufferString(t) case io.Reader: rbody = t default: v := reflect.ValueOf(bod...
[ "func", "(", "s", "*", "Service", ")", "NewRequest", "(", "ctx", "context", ".", "Context", ",", "method", ",", "path", "string", ",", "body", "interface", "{", "}", ",", "q", "interface", "{", "}", ")", "(", "*", "http", ".", "Request", ",", "erro...
// NewRequest generates an HTTP request, but does not perform the request.
[ "NewRequest", "generates", "an", "HTTP", "request", "but", "does", "not", "perform", "the", "request", "." ]
ad17585a922f269c393cbccf2e0cf81eb8d2e431
https://github.com/heroku/heroku-go/blob/ad17585a922f269c393cbccf2e0cf81eb8d2e431/v3/heroku.go#L52-L101
19,865
heroku/heroku-go
v3/heroku.go
Do
func (s *Service) Do(ctx context.Context, v interface{}, method, path string, body interface{}, q interface{}, lr *ListRange) error { req, err := s.NewRequest(ctx, method, path, body, q) if err != nil { return err } if lr != nil { lr.SetHeader(req) } resp, err := s.client.Do(req) if err != nil { return err...
go
func (s *Service) Do(ctx context.Context, v interface{}, method, path string, body interface{}, q interface{}, lr *ListRange) error { req, err := s.NewRequest(ctx, method, path, body, q) if err != nil { return err } if lr != nil { lr.SetHeader(req) } resp, err := s.client.Do(req) if err != nil { return err...
[ "func", "(", "s", "*", "Service", ")", "Do", "(", "ctx", "context", ".", "Context", ",", "v", "interface", "{", "}", ",", "method", ",", "path", "string", ",", "body", "interface", "{", "}", ",", "q", "interface", "{", "}", ",", "lr", "*", "ListR...
// Do sends a request and decodes the response into v.
[ "Do", "sends", "a", "request", "and", "decodes", "the", "response", "into", "v", "." ]
ad17585a922f269c393cbccf2e0cf81eb8d2e431
https://github.com/heroku/heroku-go/blob/ad17585a922f269c393cbccf2e0cf81eb8d2e431/v3/heroku.go#L104-L125
19,866
heroku/heroku-go
v3/heroku.go
Get
func (s *Service) Get(ctx context.Context, v interface{}, path string, query interface{}, lr *ListRange) error { return s.Do(ctx, v, "GET", path, nil, query, lr) }
go
func (s *Service) Get(ctx context.Context, v interface{}, path string, query interface{}, lr *ListRange) error { return s.Do(ctx, v, "GET", path, nil, query, lr) }
[ "func", "(", "s", "*", "Service", ")", "Get", "(", "ctx", "context", ".", "Context", ",", "v", "interface", "{", "}", ",", "path", "string", ",", "query", "interface", "{", "}", ",", "lr", "*", "ListRange", ")", "error", "{", "return", "s", ".", ...
// Get sends a GET request and decodes the response into v.
[ "Get", "sends", "a", "GET", "request", "and", "decodes", "the", "response", "into", "v", "." ]
ad17585a922f269c393cbccf2e0cf81eb8d2e431
https://github.com/heroku/heroku-go/blob/ad17585a922f269c393cbccf2e0cf81eb8d2e431/v3/heroku.go#L128-L130
19,867
heroku/heroku-go
v3/heroku.go
Post
func (s *Service) Post(ctx context.Context, v interface{}, path string, body interface{}) error { return s.Do(ctx, v, "POST", path, body, nil, nil) }
go
func (s *Service) Post(ctx context.Context, v interface{}, path string, body interface{}) error { return s.Do(ctx, v, "POST", path, body, nil, nil) }
[ "func", "(", "s", "*", "Service", ")", "Post", "(", "ctx", "context", ".", "Context", ",", "v", "interface", "{", "}", ",", "path", "string", ",", "body", "interface", "{", "}", ")", "error", "{", "return", "s", ".", "Do", "(", "ctx", ",", "v", ...
// Post sends a POST request and decodes the response into v.
[ "Post", "sends", "a", "POST", "request", "and", "decodes", "the", "response", "into", "v", "." ]
ad17585a922f269c393cbccf2e0cf81eb8d2e431
https://github.com/heroku/heroku-go/blob/ad17585a922f269c393cbccf2e0cf81eb8d2e431/v3/heroku.go#L138-L140
19,868
heroku/heroku-go
v3/heroku.go
Delete
func (s *Service) Delete(ctx context.Context, v interface{}, path string) error { return s.Do(ctx, v, "DELETE", path, nil, nil, nil) }
go
func (s *Service) Delete(ctx context.Context, v interface{}, path string) error { return s.Do(ctx, v, "DELETE", path, nil, nil, nil) }
[ "func", "(", "s", "*", "Service", ")", "Delete", "(", "ctx", "context", ".", "Context", ",", "v", "interface", "{", "}", ",", "path", "string", ")", "error", "{", "return", "s", ".", "Do", "(", "ctx", ",", "v", ",", "\"", "\"", ",", "path", ","...
// Delete sends a DELETE request.
[ "Delete", "sends", "a", "DELETE", "request", "." ]
ad17585a922f269c393cbccf2e0cf81eb8d2e431
https://github.com/heroku/heroku-go/blob/ad17585a922f269c393cbccf2e0cf81eb8d2e431/v3/heroku.go#L148-L150
19,869
heroku/heroku-go
v3/heroku.go
SetHeader
func (lr *ListRange) SetHeader(req *http.Request) { var hdrval string if lr.Field != "" { hdrval += lr.Field + " " } hdrval += lr.FirstID + ".." + lr.LastID params := make([]string, 0, 2) if lr.Max != 0 { params = append(params, fmt.Sprintf("max=%d", lr.Max)) } if lr.Descending { params = append(params, "...
go
func (lr *ListRange) SetHeader(req *http.Request) { var hdrval string if lr.Field != "" { hdrval += lr.Field + " " } hdrval += lr.FirstID + ".." + lr.LastID params := make([]string, 0, 2) if lr.Max != 0 { params = append(params, fmt.Sprintf("max=%d", lr.Max)) } if lr.Descending { params = append(params, "...
[ "func", "(", "lr", "*", "ListRange", ")", "SetHeader", "(", "req", "*", "http", ".", "Request", ")", "{", "var", "hdrval", "string", "\n", "if", "lr", ".", "Field", "!=", "\"", "\"", "{", "hdrval", "+=", "lr", ".", "Field", "+", "\"", "\"", "\n",...
// SetHeader set headers on the given Request.
[ "SetHeader", "set", "headers", "on", "the", "given", "Request", "." ]
ad17585a922f269c393cbccf2e0cf81eb8d2e431
https://github.com/heroku/heroku-go/blob/ad17585a922f269c393cbccf2e0cf81eb8d2e431/v3/heroku.go#L162-L180
19,870
heroku/heroku-go
v3/heroku.go
AccountFeatureInfo
func (s *Service) AccountFeatureInfo(ctx context.Context, accountFeatureIdentity string) (*AccountFeature, error) { var accountFeature AccountFeature return &accountFeature, s.Get(ctx, &accountFeature, fmt.Sprintf("/account/features/%v", accountFeatureIdentity), nil, nil) }
go
func (s *Service) AccountFeatureInfo(ctx context.Context, accountFeatureIdentity string) (*AccountFeature, error) { var accountFeature AccountFeature return &accountFeature, s.Get(ctx, &accountFeature, fmt.Sprintf("/account/features/%v", accountFeatureIdentity), nil, nil) }
[ "func", "(", "s", "*", "Service", ")", "AccountFeatureInfo", "(", "ctx", "context", ".", "Context", ",", "accountFeatureIdentity", "string", ")", "(", "*", "AccountFeature", ",", "error", ")", "{", "var", "accountFeature", "AccountFeature", "\n", "return", "&"...
// Info for an existing account feature.
[ "Info", "for", "an", "existing", "account", "feature", "." ]
ad17585a922f269c393cbccf2e0cf81eb8d2e431
https://github.com/heroku/heroku-go/blob/ad17585a922f269c393cbccf2e0cf81eb8d2e431/v3/heroku.go#L308-L311
19,871
heroku/heroku-go
v3/heroku.go
AccountFeatureList
func (s *Service) AccountFeatureList(ctx context.Context, lr *ListRange) (AccountFeatureListResult, error) { var accountFeature AccountFeatureListResult return accountFeature, s.Get(ctx, &accountFeature, fmt.Sprintf("/account/features"), nil, lr) }
go
func (s *Service) AccountFeatureList(ctx context.Context, lr *ListRange) (AccountFeatureListResult, error) { var accountFeature AccountFeatureListResult return accountFeature, s.Get(ctx, &accountFeature, fmt.Sprintf("/account/features"), nil, lr) }
[ "func", "(", "s", "*", "Service", ")", "AccountFeatureList", "(", "ctx", "context", ".", "Context", ",", "lr", "*", "ListRange", ")", "(", "AccountFeatureListResult", ",", "error", ")", "{", "var", "accountFeature", "AccountFeatureListResult", "\n", "return", ...
// List existing account features.
[ "List", "existing", "account", "features", "." ]
ad17585a922f269c393cbccf2e0cf81eb8d2e431
https://github.com/heroku/heroku-go/blob/ad17585a922f269c393cbccf2e0cf81eb8d2e431/v3/heroku.go#L316-L319
19,872
heroku/heroku-go
v3/heroku.go
AccountFeatureUpdate
func (s *Service) AccountFeatureUpdate(ctx context.Context, accountFeatureIdentity string, o AccountFeatureUpdateOpts) (*AccountFeature, error) { var accountFeature AccountFeature return &accountFeature, s.Patch(ctx, &accountFeature, fmt.Sprintf("/account/features/%v", accountFeatureIdentity), o) }
go
func (s *Service) AccountFeatureUpdate(ctx context.Context, accountFeatureIdentity string, o AccountFeatureUpdateOpts) (*AccountFeature, error) { var accountFeature AccountFeature return &accountFeature, s.Patch(ctx, &accountFeature, fmt.Sprintf("/account/features/%v", accountFeatureIdentity), o) }
[ "func", "(", "s", "*", "Service", ")", "AccountFeatureUpdate", "(", "ctx", "context", ".", "Context", ",", "accountFeatureIdentity", "string", ",", "o", "AccountFeatureUpdateOpts", ")", "(", "*", "AccountFeature", ",", "error", ")", "{", "var", "accountFeature",...
// Update an existing account feature.
[ "Update", "an", "existing", "account", "feature", "." ]
ad17585a922f269c393cbccf2e0cf81eb8d2e431
https://github.com/heroku/heroku-go/blob/ad17585a922f269c393cbccf2e0cf81eb8d2e431/v3/heroku.go#L326-L329
19,873
heroku/heroku-go
v3/heroku.go
AddOnList
func (s *Service) AddOnList(ctx context.Context, lr *ListRange) (AddOnListResult, error) { var addOn AddOnListResult return addOn, s.Get(ctx, &addOn, fmt.Sprintf("/addons"), nil, lr) }
go
func (s *Service) AddOnList(ctx context.Context, lr *ListRange) (AddOnListResult, error) { var addOn AddOnListResult return addOn, s.Get(ctx, &addOn, fmt.Sprintf("/addons"), nil, lr) }
[ "func", "(", "s", "*", "Service", ")", "AddOnList", "(", "ctx", "context", ".", "Context", ",", "lr", "*", "ListRange", ")", "(", "AddOnListResult", ",", "error", ")", "{", "var", "addOn", "AddOnListResult", "\n", "return", "addOn", ",", "s", ".", "Get...
// List all existing add-ons.
[ "List", "all", "existing", "add", "-", "ons", "." ]
ad17585a922f269c393cbccf2e0cf81eb8d2e431
https://github.com/heroku/heroku-go/blob/ad17585a922f269c393cbccf2e0cf81eb8d2e431/v3/heroku.go#L369-L372
19,874
heroku/heroku-go
v3/heroku.go
AddOnCreate
func (s *Service) AddOnCreate(ctx context.Context, appIdentity string, o AddOnCreateOpts) (*AddOn, error) { var addOn AddOn return &addOn, s.Post(ctx, &addOn, fmt.Sprintf("/apps/%v/addons", appIdentity), o) }
go
func (s *Service) AddOnCreate(ctx context.Context, appIdentity string, o AddOnCreateOpts) (*AddOn, error) { var addOn AddOn return &addOn, s.Post(ctx, &addOn, fmt.Sprintf("/apps/%v/addons", appIdentity), o) }
[ "func", "(", "s", "*", "Service", ")", "AddOnCreate", "(", "ctx", "context", ".", "Context", ",", "appIdentity", "string", ",", "o", "AddOnCreateOpts", ")", "(", "*", "AddOn", ",", "error", ")", "{", "var", "addOn", "AddOn", "\n", "return", "&", "addOn...
// Create a new add-on.
[ "Create", "a", "new", "add", "-", "on", "." ]
ad17585a922f269c393cbccf2e0cf81eb8d2e431
https://github.com/heroku/heroku-go/blob/ad17585a922f269c393cbccf2e0cf81eb8d2e431/v3/heroku.go#L391-L394
19,875
heroku/heroku-go
v3/heroku.go
AddOnDelete
func (s *Service) AddOnDelete(ctx context.Context, appIdentity string, addOnIdentity string) (*AddOn, error) { var addOn AddOn return &addOn, s.Delete(ctx, &addOn, fmt.Sprintf("/apps/%v/addons/%v", appIdentity, addOnIdentity)) }
go
func (s *Service) AddOnDelete(ctx context.Context, appIdentity string, addOnIdentity string) (*AddOn, error) { var addOn AddOn return &addOn, s.Delete(ctx, &addOn, fmt.Sprintf("/apps/%v/addons/%v", appIdentity, addOnIdentity)) }
[ "func", "(", "s", "*", "Service", ")", "AddOnDelete", "(", "ctx", "context", ".", "Context", ",", "appIdentity", "string", ",", "addOnIdentity", "string", ")", "(", "*", "AddOn", ",", "error", ")", "{", "var", "addOn", "AddOn", "\n", "return", "&", "ad...
// Delete an existing add-on.
[ "Delete", "an", "existing", "add", "-", "on", "." ]
ad17585a922f269c393cbccf2e0cf81eb8d2e431
https://github.com/heroku/heroku-go/blob/ad17585a922f269c393cbccf2e0cf81eb8d2e431/v3/heroku.go#L397-L400
19,876
heroku/heroku-go
v3/heroku.go
AddOnInfoByApp
func (s *Service) AddOnInfoByApp(ctx context.Context, appIdentity string, addOnIdentity string) (*AddOn, error) { var addOn AddOn return &addOn, s.Get(ctx, &addOn, fmt.Sprintf("/apps/%v/addons/%v", appIdentity, addOnIdentity), nil, nil) }
go
func (s *Service) AddOnInfoByApp(ctx context.Context, appIdentity string, addOnIdentity string) (*AddOn, error) { var addOn AddOn return &addOn, s.Get(ctx, &addOn, fmt.Sprintf("/apps/%v/addons/%v", appIdentity, addOnIdentity), nil, nil) }
[ "func", "(", "s", "*", "Service", ")", "AddOnInfoByApp", "(", "ctx", "context", ".", "Context", ",", "appIdentity", "string", ",", "addOnIdentity", "string", ")", "(", "*", "AddOn", ",", "error", ")", "{", "var", "addOn", "AddOn", "\n", "return", "&", ...
// Info for an existing add-on.
[ "Info", "for", "an", "existing", "add", "-", "on", "." ]
ad17585a922f269c393cbccf2e0cf81eb8d2e431
https://github.com/heroku/heroku-go/blob/ad17585a922f269c393cbccf2e0cf81eb8d2e431/v3/heroku.go#L403-L406
19,877
heroku/heroku-go
v3/heroku.go
AddOnListByApp
func (s *Service) AddOnListByApp(ctx context.Context, appIdentity string, lr *ListRange) (AddOnListByAppResult, error) { var addOn AddOnListByAppResult return addOn, s.Get(ctx, &addOn, fmt.Sprintf("/apps/%v/addons", appIdentity), nil, lr) }
go
func (s *Service) AddOnListByApp(ctx context.Context, appIdentity string, lr *ListRange) (AddOnListByAppResult, error) { var addOn AddOnListByAppResult return addOn, s.Get(ctx, &addOn, fmt.Sprintf("/apps/%v/addons", appIdentity), nil, lr) }
[ "func", "(", "s", "*", "Service", ")", "AddOnListByApp", "(", "ctx", "context", ".", "Context", ",", "appIdentity", "string", ",", "lr", "*", "ListRange", ")", "(", "AddOnListByAppResult", ",", "error", ")", "{", "var", "addOn", "AddOnListByAppResult", "\n",...
// List existing add-ons for an app.
[ "List", "existing", "add", "-", "ons", "for", "an", "app", "." ]
ad17585a922f269c393cbccf2e0cf81eb8d2e431
https://github.com/heroku/heroku-go/blob/ad17585a922f269c393cbccf2e0cf81eb8d2e431/v3/heroku.go#L411-L414
19,878
heroku/heroku-go
v3/heroku.go
AddOnUpdate
func (s *Service) AddOnUpdate(ctx context.Context, appIdentity string, addOnIdentity string, o AddOnUpdateOpts) (*AddOn, error) { var addOn AddOn return &addOn, s.Patch(ctx, &addOn, fmt.Sprintf("/apps/%v/addons/%v", appIdentity, addOnIdentity), o) }
go
func (s *Service) AddOnUpdate(ctx context.Context, appIdentity string, addOnIdentity string, o AddOnUpdateOpts) (*AddOn, error) { var addOn AddOn return &addOn, s.Patch(ctx, &addOn, fmt.Sprintf("/apps/%v/addons/%v", appIdentity, addOnIdentity), o) }
[ "func", "(", "s", "*", "Service", ")", "AddOnUpdate", "(", "ctx", "context", ".", "Context", ",", "appIdentity", "string", ",", "addOnIdentity", "string", ",", "o", "AddOnUpdateOpts", ")", "(", "*", "AddOn", ",", "error", ")", "{", "var", "addOn", "AddOn...
// Change add-on plan. Some add-ons may not support changing plans. In // that case, an error will be returned.
[ "Change", "add", "-", "on", "plan", ".", "Some", "add", "-", "ons", "may", "not", "support", "changing", "plans", ".", "In", "that", "case", "an", "error", "will", "be", "returned", "." ]
ad17585a922f269c393cbccf2e0cf81eb8d2e431
https://github.com/heroku/heroku-go/blob/ad17585a922f269c393cbccf2e0cf81eb8d2e431/v3/heroku.go#L422-L425
19,879
heroku/heroku-go
v3/heroku.go
AddOnListByUser
func (s *Service) AddOnListByUser(ctx context.Context, accountIdentity string, lr *ListRange) (AddOnListByUserResult, error) { var addOn AddOnListByUserResult return addOn, s.Get(ctx, &addOn, fmt.Sprintf("/users/%v/addons", accountIdentity), nil, lr) }
go
func (s *Service) AddOnListByUser(ctx context.Context, accountIdentity string, lr *ListRange) (AddOnListByUserResult, error) { var addOn AddOnListByUserResult return addOn, s.Get(ctx, &addOn, fmt.Sprintf("/users/%v/addons", accountIdentity), nil, lr) }
[ "func", "(", "s", "*", "Service", ")", "AddOnListByUser", "(", "ctx", "context", ".", "Context", ",", "accountIdentity", "string", ",", "lr", "*", "ListRange", ")", "(", "AddOnListByUserResult", ",", "error", ")", "{", "var", "addOn", "AddOnListByUserResult", ...
// List all existing add-ons a user has access to
[ "List", "all", "existing", "add", "-", "ons", "a", "user", "has", "access", "to" ]
ad17585a922f269c393cbccf2e0cf81eb8d2e431
https://github.com/heroku/heroku-go/blob/ad17585a922f269c393cbccf2e0cf81eb8d2e431/v3/heroku.go#L430-L433
19,880
heroku/heroku-go
v3/heroku.go
AddOnListByTeam
func (s *Service) AddOnListByTeam(ctx context.Context, teamIdentity string, lr *ListRange) (AddOnListByTeamResult, error) { var addOn AddOnListByTeamResult return addOn, s.Get(ctx, &addOn, fmt.Sprintf("/teams/%v/addons", teamIdentity), nil, lr) }
go
func (s *Service) AddOnListByTeam(ctx context.Context, teamIdentity string, lr *ListRange) (AddOnListByTeamResult, error) { var addOn AddOnListByTeamResult return addOn, s.Get(ctx, &addOn, fmt.Sprintf("/teams/%v/addons", teamIdentity), nil, lr) }
[ "func", "(", "s", "*", "Service", ")", "AddOnListByTeam", "(", "ctx", "context", ".", "Context", ",", "teamIdentity", "string", ",", "lr", "*", "ListRange", ")", "(", "AddOnListByTeamResult", ",", "error", ")", "{", "var", "addOn", "AddOnListByTeamResult", "...
// List add-ons used across all Team apps
[ "List", "add", "-", "ons", "used", "across", "all", "Team", "apps" ]
ad17585a922f269c393cbccf2e0cf81eb8d2e431
https://github.com/heroku/heroku-go/blob/ad17585a922f269c393cbccf2e0cf81eb8d2e431/v3/heroku.go#L438-L441
19,881
heroku/heroku-go
v3/heroku.go
AddOnActionProvision
func (s *Service) AddOnActionProvision(ctx context.Context, addOnIdentity string) (*AddOnActionProvisionResult, error) { var addOnAction AddOnActionProvisionResult return &addOnAction, s.Post(ctx, &addOnAction, fmt.Sprintf("/addons/%v/actions/provision", addOnIdentity), nil) }
go
func (s *Service) AddOnActionProvision(ctx context.Context, addOnIdentity string) (*AddOnActionProvisionResult, error) { var addOnAction AddOnActionProvisionResult return &addOnAction, s.Post(ctx, &addOnAction, fmt.Sprintf("/addons/%v/actions/provision", addOnIdentity), nil) }
[ "func", "(", "s", "*", "Service", ")", "AddOnActionProvision", "(", "ctx", "context", ".", "Context", ",", "addOnIdentity", "string", ")", "(", "*", "AddOnActionProvisionResult", ",", "error", ")", "{", "var", "addOnAction", "AddOnActionProvisionResult", "\n", "...
// Mark an add-on as provisioned for use.
[ "Mark", "an", "add", "-", "on", "as", "provisioned", "for", "use", "." ]
ad17585a922f269c393cbccf2e0cf81eb8d2e431
https://github.com/heroku/heroku-go/blob/ad17585a922f269c393cbccf2e0cf81eb8d2e431/v3/heroku.go#L498-L501
19,882
heroku/heroku-go
v3/heroku.go
AddOnActionDeprovision
func (s *Service) AddOnActionDeprovision(ctx context.Context, addOnIdentity string) (*AddOnActionDeprovisionResult, error) { var addOnAction AddOnActionDeprovisionResult return &addOnAction, s.Post(ctx, &addOnAction, fmt.Sprintf("/addons/%v/actions/deprovision", addOnIdentity), nil) }
go
func (s *Service) AddOnActionDeprovision(ctx context.Context, addOnIdentity string) (*AddOnActionDeprovisionResult, error) { var addOnAction AddOnActionDeprovisionResult return &addOnAction, s.Post(ctx, &addOnAction, fmt.Sprintf("/addons/%v/actions/deprovision", addOnIdentity), nil) }
[ "func", "(", "s", "*", "Service", ")", "AddOnActionDeprovision", "(", "ctx", "context", ".", "Context", ",", "addOnIdentity", "string", ")", "(", "*", "AddOnActionDeprovisionResult", ",", "error", ")", "{", "var", "addOnAction", "AddOnActionDeprovisionResult", "\n...
// Mark an add-on as deprovisioned.
[ "Mark", "an", "add", "-", "on", "as", "deprovisioned", "." ]
ad17585a922f269c393cbccf2e0cf81eb8d2e431
https://github.com/heroku/heroku-go/blob/ad17585a922f269c393cbccf2e0cf81eb8d2e431/v3/heroku.go#L538-L541
19,883
heroku/heroku-go
v3/heroku.go
AddOnAttachmentCreate
func (s *Service) AddOnAttachmentCreate(ctx context.Context, o AddOnAttachmentCreateOpts) (*AddOnAttachment, error) { var addOnAttachment AddOnAttachment return &addOnAttachment, s.Post(ctx, &addOnAttachment, fmt.Sprintf("/addon-attachments"), o) }
go
func (s *Service) AddOnAttachmentCreate(ctx context.Context, o AddOnAttachmentCreateOpts) (*AddOnAttachment, error) { var addOnAttachment AddOnAttachment return &addOnAttachment, s.Post(ctx, &addOnAttachment, fmt.Sprintf("/addon-attachments"), o) }
[ "func", "(", "s", "*", "Service", ")", "AddOnAttachmentCreate", "(", "ctx", "context", ".", "Context", ",", "o", "AddOnAttachmentCreateOpts", ")", "(", "*", "AddOnAttachment", ",", "error", ")", "{", "var", "addOnAttachment", "AddOnAttachment", "\n", "return", ...
// Create a new add-on attachment.
[ "Create", "a", "new", "add", "-", "on", "attachment", "." ]
ad17585a922f269c393cbccf2e0cf81eb8d2e431
https://github.com/heroku/heroku-go/blob/ad17585a922f269c393cbccf2e0cf81eb8d2e431/v3/heroku.go#L575-L578
19,884
heroku/heroku-go
v3/heroku.go
AddOnAttachmentDelete
func (s *Service) AddOnAttachmentDelete(ctx context.Context, addOnAttachmentIdentity string) (*AddOnAttachment, error) { var addOnAttachment AddOnAttachment return &addOnAttachment, s.Delete(ctx, &addOnAttachment, fmt.Sprintf("/addon-attachments/%v", addOnAttachmentIdentity)) }
go
func (s *Service) AddOnAttachmentDelete(ctx context.Context, addOnAttachmentIdentity string) (*AddOnAttachment, error) { var addOnAttachment AddOnAttachment return &addOnAttachment, s.Delete(ctx, &addOnAttachment, fmt.Sprintf("/addon-attachments/%v", addOnAttachmentIdentity)) }
[ "func", "(", "s", "*", "Service", ")", "AddOnAttachmentDelete", "(", "ctx", "context", ".", "Context", ",", "addOnAttachmentIdentity", "string", ")", "(", "*", "AddOnAttachment", ",", "error", ")", "{", "var", "addOnAttachment", "AddOnAttachment", "\n", "return"...
// Delete an existing add-on attachment.
[ "Delete", "an", "existing", "add", "-", "on", "attachment", "." ]
ad17585a922f269c393cbccf2e0cf81eb8d2e431
https://github.com/heroku/heroku-go/blob/ad17585a922f269c393cbccf2e0cf81eb8d2e431/v3/heroku.go#L581-L584
19,885
heroku/heroku-go
v3/heroku.go
AddOnAttachmentInfo
func (s *Service) AddOnAttachmentInfo(ctx context.Context, addOnAttachmentIdentity string) (*AddOnAttachment, error) { var addOnAttachment AddOnAttachment return &addOnAttachment, s.Get(ctx, &addOnAttachment, fmt.Sprintf("/addon-attachments/%v", addOnAttachmentIdentity), nil, nil) }
go
func (s *Service) AddOnAttachmentInfo(ctx context.Context, addOnAttachmentIdentity string) (*AddOnAttachment, error) { var addOnAttachment AddOnAttachment return &addOnAttachment, s.Get(ctx, &addOnAttachment, fmt.Sprintf("/addon-attachments/%v", addOnAttachmentIdentity), nil, nil) }
[ "func", "(", "s", "*", "Service", ")", "AddOnAttachmentInfo", "(", "ctx", "context", ".", "Context", ",", "addOnAttachmentIdentity", "string", ")", "(", "*", "AddOnAttachment", ",", "error", ")", "{", "var", "addOnAttachment", "AddOnAttachment", "\n", "return", ...
// Info for existing add-on attachment.
[ "Info", "for", "existing", "add", "-", "on", "attachment", "." ]
ad17585a922f269c393cbccf2e0cf81eb8d2e431
https://github.com/heroku/heroku-go/blob/ad17585a922f269c393cbccf2e0cf81eb8d2e431/v3/heroku.go#L587-L590
19,886
heroku/heroku-go
v3/heroku.go
AddOnAttachmentList
func (s *Service) AddOnAttachmentList(ctx context.Context, lr *ListRange) (AddOnAttachmentListResult, error) { var addOnAttachment AddOnAttachmentListResult return addOnAttachment, s.Get(ctx, &addOnAttachment, fmt.Sprintf("/addon-attachments"), nil, lr) }
go
func (s *Service) AddOnAttachmentList(ctx context.Context, lr *ListRange) (AddOnAttachmentListResult, error) { var addOnAttachment AddOnAttachmentListResult return addOnAttachment, s.Get(ctx, &addOnAttachment, fmt.Sprintf("/addon-attachments"), nil, lr) }
[ "func", "(", "s", "*", "Service", ")", "AddOnAttachmentList", "(", "ctx", "context", ".", "Context", ",", "lr", "*", "ListRange", ")", "(", "AddOnAttachmentListResult", ",", "error", ")", "{", "var", "addOnAttachment", "AddOnAttachmentListResult", "\n", "return"...
// List existing add-on attachments.
[ "List", "existing", "add", "-", "on", "attachments", "." ]
ad17585a922f269c393cbccf2e0cf81eb8d2e431
https://github.com/heroku/heroku-go/blob/ad17585a922f269c393cbccf2e0cf81eb8d2e431/v3/heroku.go#L595-L598
19,887
heroku/heroku-go
v3/heroku.go
AddOnAttachmentListByAddOn
func (s *Service) AddOnAttachmentListByAddOn(ctx context.Context, addOnIdentity string, lr *ListRange) (AddOnAttachmentListByAddOnResult, error) { var addOnAttachment AddOnAttachmentListByAddOnResult return addOnAttachment, s.Get(ctx, &addOnAttachment, fmt.Sprintf("/addons/%v/addon-attachments", addOnIdentity), nil, ...
go
func (s *Service) AddOnAttachmentListByAddOn(ctx context.Context, addOnIdentity string, lr *ListRange) (AddOnAttachmentListByAddOnResult, error) { var addOnAttachment AddOnAttachmentListByAddOnResult return addOnAttachment, s.Get(ctx, &addOnAttachment, fmt.Sprintf("/addons/%v/addon-attachments", addOnIdentity), nil, ...
[ "func", "(", "s", "*", "Service", ")", "AddOnAttachmentListByAddOn", "(", "ctx", "context", ".", "Context", ",", "addOnIdentity", "string", ",", "lr", "*", "ListRange", ")", "(", "AddOnAttachmentListByAddOnResult", ",", "error", ")", "{", "var", "addOnAttachment...
// List existing add-on attachments for an add-on.
[ "List", "existing", "add", "-", "on", "attachments", "for", "an", "add", "-", "on", "." ]
ad17585a922f269c393cbccf2e0cf81eb8d2e431
https://github.com/heroku/heroku-go/blob/ad17585a922f269c393cbccf2e0cf81eb8d2e431/v3/heroku.go#L603-L606
19,888
heroku/heroku-go
v3/heroku.go
AddOnAttachmentListByApp
func (s *Service) AddOnAttachmentListByApp(ctx context.Context, appIdentity string, lr *ListRange) (AddOnAttachmentListByAppResult, error) { var addOnAttachment AddOnAttachmentListByAppResult return addOnAttachment, s.Get(ctx, &addOnAttachment, fmt.Sprintf("/apps/%v/addon-attachments", appIdentity), nil, lr) }
go
func (s *Service) AddOnAttachmentListByApp(ctx context.Context, appIdentity string, lr *ListRange) (AddOnAttachmentListByAppResult, error) { var addOnAttachment AddOnAttachmentListByAppResult return addOnAttachment, s.Get(ctx, &addOnAttachment, fmt.Sprintf("/apps/%v/addon-attachments", appIdentity), nil, lr) }
[ "func", "(", "s", "*", "Service", ")", "AddOnAttachmentListByApp", "(", "ctx", "context", ".", "Context", ",", "appIdentity", "string", ",", "lr", "*", "ListRange", ")", "(", "AddOnAttachmentListByAppResult", ",", "error", ")", "{", "var", "addOnAttachment", "...
// List existing add-on attachments for an app.
[ "List", "existing", "add", "-", "on", "attachments", "for", "an", "app", "." ]
ad17585a922f269c393cbccf2e0cf81eb8d2e431
https://github.com/heroku/heroku-go/blob/ad17585a922f269c393cbccf2e0cf81eb8d2e431/v3/heroku.go#L611-L614
19,889
heroku/heroku-go
v3/heroku.go
AddOnAttachmentInfoByApp
func (s *Service) AddOnAttachmentInfoByApp(ctx context.Context, appIdentity string, addOnAttachmentScopedIdentity string) (*AddOnAttachment, error) { var addOnAttachment AddOnAttachment return &addOnAttachment, s.Get(ctx, &addOnAttachment, fmt.Sprintf("/apps/%v/addon-attachments/%v", appIdentity, addOnAttachmentScope...
go
func (s *Service) AddOnAttachmentInfoByApp(ctx context.Context, appIdentity string, addOnAttachmentScopedIdentity string) (*AddOnAttachment, error) { var addOnAttachment AddOnAttachment return &addOnAttachment, s.Get(ctx, &addOnAttachment, fmt.Sprintf("/apps/%v/addon-attachments/%v", appIdentity, addOnAttachmentScope...
[ "func", "(", "s", "*", "Service", ")", "AddOnAttachmentInfoByApp", "(", "ctx", "context", ".", "Context", ",", "appIdentity", "string", ",", "addOnAttachmentScopedIdentity", "string", ")", "(", "*", "AddOnAttachment", ",", "error", ")", "{", "var", "addOnAttachm...
// Info for existing add-on attachment for an app.
[ "Info", "for", "existing", "add", "-", "on", "attachment", "for", "an", "app", "." ]
ad17585a922f269c393cbccf2e0cf81eb8d2e431
https://github.com/heroku/heroku-go/blob/ad17585a922f269c393cbccf2e0cf81eb8d2e431/v3/heroku.go#L617-L620
19,890
heroku/heroku-go
v3/heroku.go
AddOnConfigList
func (s *Service) AddOnConfigList(ctx context.Context, addOnIdentity string, lr *ListRange) (AddOnConfigListResult, error) { var addOnConfig AddOnConfigListResult return addOnConfig, s.Get(ctx, &addOnConfig, fmt.Sprintf("/addons/%v/config", addOnIdentity), nil, lr) }
go
func (s *Service) AddOnConfigList(ctx context.Context, addOnIdentity string, lr *ListRange) (AddOnConfigListResult, error) { var addOnConfig AddOnConfigListResult return addOnConfig, s.Get(ctx, &addOnConfig, fmt.Sprintf("/addons/%v/config", addOnIdentity), nil, lr) }
[ "func", "(", "s", "*", "Service", ")", "AddOnConfigList", "(", "ctx", "context", ".", "Context", ",", "addOnIdentity", "string", ",", "lr", "*", "ListRange", ")", "(", "AddOnConfigListResult", ",", "error", ")", "{", "var", "addOnConfig", "AddOnConfigListResul...
// Get an add-on's config. Accessible by customers with access and by // the add-on partner providing this add-on.
[ "Get", "an", "add", "-", "on", "s", "config", ".", "Accessible", "by", "customers", "with", "access", "and", "by", "the", "add", "-", "on", "partner", "providing", "this", "add", "-", "on", "." ]
ad17585a922f269c393cbccf2e0cf81eb8d2e431
https://github.com/heroku/heroku-go/blob/ad17585a922f269c393cbccf2e0cf81eb8d2e431/v3/heroku.go#L646-L649
19,891
heroku/heroku-go
v3/heroku.go
AddOnConfigUpdate
func (s *Service) AddOnConfigUpdate(ctx context.Context, addOnIdentity string, o AddOnConfigUpdateOpts) (AddOnConfigUpdateResult, error) { var addOnConfig AddOnConfigUpdateResult return addOnConfig, s.Patch(ctx, &addOnConfig, fmt.Sprintf("/addons/%v/config", addOnIdentity), o) }
go
func (s *Service) AddOnConfigUpdate(ctx context.Context, addOnIdentity string, o AddOnConfigUpdateOpts) (AddOnConfigUpdateResult, error) { var addOnConfig AddOnConfigUpdateResult return addOnConfig, s.Patch(ctx, &addOnConfig, fmt.Sprintf("/addons/%v/config", addOnIdentity), o) }
[ "func", "(", "s", "*", "Service", ")", "AddOnConfigUpdate", "(", "ctx", "context", ".", "Context", ",", "addOnIdentity", "string", ",", "o", "AddOnConfigUpdateOpts", ")", "(", "AddOnConfigUpdateResult", ",", "error", ")", "{", "var", "addOnConfig", "AddOnConfigU...
// Update an add-on's config. Can only be accessed by the add-on partner // providing this add-on.
[ "Update", "an", "add", "-", "on", "s", "config", ".", "Can", "only", "be", "accessed", "by", "the", "add", "-", "on", "partner", "providing", "this", "add", "-", "on", "." ]
ad17585a922f269c393cbccf2e0cf81eb8d2e431
https://github.com/heroku/heroku-go/blob/ad17585a922f269c393cbccf2e0cf81eb8d2e431/v3/heroku.go#L661-L664
19,892
heroku/heroku-go
v3/heroku.go
AddOnRegionCapabilityList
func (s *Service) AddOnRegionCapabilityList(ctx context.Context, lr *ListRange) (AddOnRegionCapabilityListResult, error) { var addOnRegionCapability AddOnRegionCapabilityListResult return addOnRegionCapability, s.Get(ctx, &addOnRegionCapability, fmt.Sprintf("/addon-region-capabilities"), nil, lr) }
go
func (s *Service) AddOnRegionCapabilityList(ctx context.Context, lr *ListRange) (AddOnRegionCapabilityListResult, error) { var addOnRegionCapability AddOnRegionCapabilityListResult return addOnRegionCapability, s.Get(ctx, &addOnRegionCapability, fmt.Sprintf("/addon-region-capabilities"), nil, lr) }
[ "func", "(", "s", "*", "Service", ")", "AddOnRegionCapabilityList", "(", "ctx", "context", ".", "Context", ",", "lr", "*", "ListRange", ")", "(", "AddOnRegionCapabilityListResult", ",", "error", ")", "{", "var", "addOnRegionCapability", "AddOnRegionCapabilityListRes...
// List all existing add-on region capabilities.
[ "List", "all", "existing", "add", "-", "on", "region", "capabilities", "." ]
ad17585a922f269c393cbccf2e0cf81eb8d2e431
https://github.com/heroku/heroku-go/blob/ad17585a922f269c393cbccf2e0cf81eb8d2e431/v3/heroku.go#L716-L719
19,893
heroku/heroku-go
v3/heroku.go
AddOnRegionCapabilityListByAddOnService
func (s *Service) AddOnRegionCapabilityListByAddOnService(ctx context.Context, addOnServiceIdentity string, lr *ListRange) (AddOnRegionCapabilityListByAddOnServiceResult, error) { var addOnRegionCapability AddOnRegionCapabilityListByAddOnServiceResult return addOnRegionCapability, s.Get(ctx, &addOnRegionCapability, f...
go
func (s *Service) AddOnRegionCapabilityListByAddOnService(ctx context.Context, addOnServiceIdentity string, lr *ListRange) (AddOnRegionCapabilityListByAddOnServiceResult, error) { var addOnRegionCapability AddOnRegionCapabilityListByAddOnServiceResult return addOnRegionCapability, s.Get(ctx, &addOnRegionCapability, f...
[ "func", "(", "s", "*", "Service", ")", "AddOnRegionCapabilityListByAddOnService", "(", "ctx", "context", ".", "Context", ",", "addOnServiceIdentity", "string", ",", "lr", "*", "ListRange", ")", "(", "AddOnRegionCapabilityListByAddOnServiceResult", ",", "error", ")", ...
// List existing add-on region capabilities for an add-on-service
[ "List", "existing", "add", "-", "on", "region", "capabilities", "for", "an", "add", "-", "on", "-", "service" ]
ad17585a922f269c393cbccf2e0cf81eb8d2e431
https://github.com/heroku/heroku-go/blob/ad17585a922f269c393cbccf2e0cf81eb8d2e431/v3/heroku.go#L724-L727
19,894
heroku/heroku-go
v3/heroku.go
AddOnRegionCapabilityListByRegion
func (s *Service) AddOnRegionCapabilityListByRegion(ctx context.Context, regionIdentity string, lr *ListRange) (AddOnRegionCapabilityListByRegionResult, error) { var addOnRegionCapability AddOnRegionCapabilityListByRegionResult return addOnRegionCapability, s.Get(ctx, &addOnRegionCapability, fmt.Sprintf("/regions/%v/...
go
func (s *Service) AddOnRegionCapabilityListByRegion(ctx context.Context, regionIdentity string, lr *ListRange) (AddOnRegionCapabilityListByRegionResult, error) { var addOnRegionCapability AddOnRegionCapabilityListByRegionResult return addOnRegionCapability, s.Get(ctx, &addOnRegionCapability, fmt.Sprintf("/regions/%v/...
[ "func", "(", "s", "*", "Service", ")", "AddOnRegionCapabilityListByRegion", "(", "ctx", "context", ".", "Context", ",", "regionIdentity", "string", ",", "lr", "*", "ListRange", ")", "(", "AddOnRegionCapabilityListByRegionResult", ",", "error", ")", "{", "var", "...
// List existing add-on region capabilities for a region.
[ "List", "existing", "add", "-", "on", "region", "capabilities", "for", "a", "region", "." ]
ad17585a922f269c393cbccf2e0cf81eb8d2e431
https://github.com/heroku/heroku-go/blob/ad17585a922f269c393cbccf2e0cf81eb8d2e431/v3/heroku.go#L732-L735
19,895
heroku/heroku-go
v3/heroku.go
AddOnServiceInfo
func (s *Service) AddOnServiceInfo(ctx context.Context, addOnServiceIdentity string) (*AddOnService, error) { var addOnService AddOnService return &addOnService, s.Get(ctx, &addOnService, fmt.Sprintf("/addon-services/%v", addOnServiceIdentity), nil, nil) }
go
func (s *Service) AddOnServiceInfo(ctx context.Context, addOnServiceIdentity string) (*AddOnService, error) { var addOnService AddOnService return &addOnService, s.Get(ctx, &addOnService, fmt.Sprintf("/addon-services/%v", addOnServiceIdentity), nil, nil) }
[ "func", "(", "s", "*", "Service", ")", "AddOnServiceInfo", "(", "ctx", "context", ".", "Context", ",", "addOnServiceIdentity", "string", ")", "(", "*", "AddOnService", ",", "error", ")", "{", "var", "addOnService", "AddOnService", "\n", "return", "&", "addOn...
// Info for existing add-on-service.
[ "Info", "for", "existing", "add", "-", "on", "-", "service", "." ]
ad17585a922f269c393cbccf2e0cf81eb8d2e431
https://github.com/heroku/heroku-go/blob/ad17585a922f269c393cbccf2e0cf81eb8d2e431/v3/heroku.go#L755-L758
19,896
heroku/heroku-go
v3/heroku.go
AddOnServiceList
func (s *Service) AddOnServiceList(ctx context.Context, lr *ListRange) (AddOnServiceListResult, error) { var addOnService AddOnServiceListResult return addOnService, s.Get(ctx, &addOnService, fmt.Sprintf("/addon-services"), nil, lr) }
go
func (s *Service) AddOnServiceList(ctx context.Context, lr *ListRange) (AddOnServiceListResult, error) { var addOnService AddOnServiceListResult return addOnService, s.Get(ctx, &addOnService, fmt.Sprintf("/addon-services"), nil, lr) }
[ "func", "(", "s", "*", "Service", ")", "AddOnServiceList", "(", "ctx", "context", ".", "Context", ",", "lr", "*", "ListRange", ")", "(", "AddOnServiceListResult", ",", "error", ")", "{", "var", "addOnService", "AddOnServiceListResult", "\n", "return", "addOnSe...
// List existing add-on-services.
[ "List", "existing", "add", "-", "on", "-", "services", "." ]
ad17585a922f269c393cbccf2e0cf81eb8d2e431
https://github.com/heroku/heroku-go/blob/ad17585a922f269c393cbccf2e0cf81eb8d2e431/v3/heroku.go#L763-L766
19,897
heroku/heroku-go
v3/heroku.go
AddOnWebhookCreate
func (s *Service) AddOnWebhookCreate(ctx context.Context, addOnIdentity string, o AddOnWebhookCreateOpts) (*AddOnWebhookCreateResult, error) { var addOnWebhook AddOnWebhookCreateResult return &addOnWebhook, s.Post(ctx, &addOnWebhook, fmt.Sprintf("/addons/%v/webhooks", addOnIdentity), o) }
go
func (s *Service) AddOnWebhookCreate(ctx context.Context, addOnIdentity string, o AddOnWebhookCreateOpts) (*AddOnWebhookCreateResult, error) { var addOnWebhook AddOnWebhookCreateResult return &addOnWebhook, s.Post(ctx, &addOnWebhook, fmt.Sprintf("/addons/%v/webhooks", addOnIdentity), o) }
[ "func", "(", "s", "*", "Service", ")", "AddOnWebhookCreate", "(", "ctx", "context", ".", "Context", ",", "addOnIdentity", "string", ",", "o", "AddOnWebhookCreateOpts", ")", "(", "*", "AddOnWebhookCreateResult", ",", "error", ")", "{", "var", "addOnWebhook", "A...
// Create an add-on webhook subscription. Can only be accessed by the // add-on partner providing this add-on.
[ "Create", "an", "add", "-", "on", "webhook", "subscription", ".", "Can", "only", "be", "accessed", "by", "the", "add", "-", "on", "partner", "providing", "this", "add", "-", "on", "." ]
ad17585a922f269c393cbccf2e0cf81eb8d2e431
https://github.com/heroku/heroku-go/blob/ad17585a922f269c393cbccf2e0cf81eb8d2e431/v3/heroku.go#L808-L811
19,898
heroku/heroku-go
v3/heroku.go
AddOnWebhookDelete
func (s *Service) AddOnWebhookDelete(ctx context.Context, addOnIdentity string, appWebhookIdentity string) (*AddOnWebhookDeleteResult, error) { var addOnWebhook AddOnWebhookDeleteResult return &addOnWebhook, s.Delete(ctx, &addOnWebhook, fmt.Sprintf("/addons/%v/webhooks/%v", addOnIdentity, appWebhookIdentity)) }
go
func (s *Service) AddOnWebhookDelete(ctx context.Context, addOnIdentity string, appWebhookIdentity string) (*AddOnWebhookDeleteResult, error) { var addOnWebhook AddOnWebhookDeleteResult return &addOnWebhook, s.Delete(ctx, &addOnWebhook, fmt.Sprintf("/addons/%v/webhooks/%v", addOnIdentity, appWebhookIdentity)) }
[ "func", "(", "s", "*", "Service", ")", "AddOnWebhookDelete", "(", "ctx", "context", ".", "Context", ",", "addOnIdentity", "string", ",", "appWebhookIdentity", "string", ")", "(", "*", "AddOnWebhookDeleteResult", ",", "error", ")", "{", "var", "addOnWebhook", "...
// Removes an add-on webhook subscription. Can only be accessed by the // add-on partner providing this add-on.
[ "Removes", "an", "add", "-", "on", "webhook", "subscription", ".", "Can", "only", "be", "accessed", "by", "the", "add", "-", "on", "partner", "providing", "this", "add", "-", "on", "." ]
ad17585a922f269c393cbccf2e0cf81eb8d2e431
https://github.com/heroku/heroku-go/blob/ad17585a922f269c393cbccf2e0cf81eb8d2e431/v3/heroku.go#L830-L833
19,899
heroku/heroku-go
v3/heroku.go
AddOnWebhookInfo
func (s *Service) AddOnWebhookInfo(ctx context.Context, addOnIdentity string, appWebhookIdentity string) (*AddOnWebhookInfoResult, error) { var addOnWebhook AddOnWebhookInfoResult return &addOnWebhook, s.Get(ctx, &addOnWebhook, fmt.Sprintf("/addons/%v/webhooks/%v", addOnIdentity, appWebhookIdentity), nil, nil) }
go
func (s *Service) AddOnWebhookInfo(ctx context.Context, addOnIdentity string, appWebhookIdentity string) (*AddOnWebhookInfoResult, error) { var addOnWebhook AddOnWebhookInfoResult return &addOnWebhook, s.Get(ctx, &addOnWebhook, fmt.Sprintf("/addons/%v/webhooks/%v", addOnIdentity, appWebhookIdentity), nil, nil) }
[ "func", "(", "s", "*", "Service", ")", "AddOnWebhookInfo", "(", "ctx", "context", ".", "Context", ",", "addOnIdentity", "string", ",", "appWebhookIdentity", "string", ")", "(", "*", "AddOnWebhookInfoResult", ",", "error", ")", "{", "var", "addOnWebhook", "AddO...
// Returns the info for an add-on webhook subscription. Can only be // accessed by the add-on partner providing this add-on.
[ "Returns", "the", "info", "for", "an", "add", "-", "on", "webhook", "subscription", ".", "Can", "only", "be", "accessed", "by", "the", "add", "-", "on", "partner", "providing", "this", "add", "-", "on", "." ]
ad17585a922f269c393cbccf2e0cf81eb8d2e431
https://github.com/heroku/heroku-go/blob/ad17585a922f269c393cbccf2e0cf81eb8d2e431/v3/heroku.go#L852-L855