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 |
|---|---|---|---|---|---|---|---|---|---|---|---|
25,900 | cloudfoundry/cli | actor/v2action/service_plan_visibility.go | GetServicePlanVisibilities | func (actor *Actor) GetServicePlanVisibilities(planGUID string) ([]ServicePlanVisibility, Warnings, error) {
visibilities, warnings, err := actor.CloudControllerClient.GetServicePlanVisibilities(ccv2.Filter{
Type: constant.ServicePlanGUIDFilter,
Operator: constant.EqualOperator,
Values: []string{planGUID},... | go | func (actor *Actor) GetServicePlanVisibilities(planGUID string) ([]ServicePlanVisibility, Warnings, error) {
visibilities, warnings, err := actor.CloudControllerClient.GetServicePlanVisibilities(ccv2.Filter{
Type: constant.ServicePlanGUIDFilter,
Operator: constant.EqualOperator,
Values: []string{planGUID},... | [
"func",
"(",
"actor",
"*",
"Actor",
")",
"GetServicePlanVisibilities",
"(",
"planGUID",
"string",
")",
"(",
"[",
"]",
"ServicePlanVisibility",
",",
"Warnings",
",",
"error",
")",
"{",
"visibilities",
",",
"warnings",
",",
"err",
":=",
"actor",
".",
"CloudCon... | // GetServicePlanVisibilities fetches service plan visibilities for a plan by GUID. | [
"GetServicePlanVisibilities",
"fetches",
"service",
"plan",
"visibilities",
"for",
"a",
"plan",
"by",
"GUID",
"."
] | 5010c000047f246b870475e2c299556078cdad30 | https://github.com/cloudfoundry/cli/blob/5010c000047f246b870475e2c299556078cdad30/actor/v2action/service_plan_visibility.go#L11-L27 |
25,901 | cloudfoundry/cli | api/cloudcontroller/ccv3/internal/routing.go | CreatePath | func (r Route) CreatePath(params Params) (string, error) {
components := strings.Split(r.Path, "/")
for i, c := range components {
if len(c) == 0 {
continue
}
if c[0] == ':' {
val, ok := params[c[1:]]
if !ok {
return "", fmt.Errorf("missing param %s", c)
}
components[i] = val
}
}
u, err ... | go | func (r Route) CreatePath(params Params) (string, error) {
components := strings.Split(r.Path, "/")
for i, c := range components {
if len(c) == 0 {
continue
}
if c[0] == ':' {
val, ok := params[c[1:]]
if !ok {
return "", fmt.Errorf("missing param %s", c)
}
components[i] = val
}
}
u, err ... | [
"func",
"(",
"r",
"Route",
")",
"CreatePath",
"(",
"params",
"Params",
")",
"(",
"string",
",",
"error",
")",
"{",
"components",
":=",
"strings",
".",
"Split",
"(",
"r",
".",
"Path",
",",
"\"",
"\"",
")",
"\n",
"for",
"i",
",",
"c",
":=",
"range"... | // CreatePath combines the route's path pattern with a Params map
// to produce a valid path. | [
"CreatePath",
"combines",
"the",
"route",
"s",
"path",
"pattern",
"with",
"a",
"Params",
"map",
"to",
"produce",
"a",
"valid",
"path",
"."
] | 5010c000047f246b870475e2c299556078cdad30 | https://github.com/cloudfoundry/cli/blob/5010c000047f246b870475e2c299556078cdad30/api/cloudcontroller/ccv3/internal/routing.go#L73-L93 |
25,902 | cloudfoundry/cli | api/cloudcontroller/ccv3/internal/routing.go | NewRouter | func NewRouter(routes []Route, resources map[string]string) *Router {
mappedRoutes := map[string]Route{}
for _, route := range routes {
mappedRoutes[route.Name] = route
}
return &Router{
routes: mappedRoutes,
resources: resources,
}
} | go | func NewRouter(routes []Route, resources map[string]string) *Router {
mappedRoutes := map[string]Route{}
for _, route := range routes {
mappedRoutes[route.Name] = route
}
return &Router{
routes: mappedRoutes,
resources: resources,
}
} | [
"func",
"NewRouter",
"(",
"routes",
"[",
"]",
"Route",
",",
"resources",
"map",
"[",
"string",
"]",
"string",
")",
"*",
"Router",
"{",
"mappedRoutes",
":=",
"map",
"[",
"string",
"]",
"Route",
"{",
"}",
"\n",
"for",
"_",
",",
"route",
":=",
"range",
... | // NewRouter returns a pointer to a new Router. | [
"NewRouter",
"returns",
"a",
"pointer",
"to",
"a",
"new",
"Router",
"."
] | 5010c000047f246b870475e2c299556078cdad30 | https://github.com/cloudfoundry/cli/blob/5010c000047f246b870475e2c299556078cdad30/api/cloudcontroller/ccv3/internal/routing.go#L103-L112 |
25,903 | cloudfoundry/cli | api/cloudcontroller/ccv3/internal/routing.go | CreateRequest | func (router Router) CreateRequest(name string, params Params, body io.Reader) (*http.Request, error) {
route, ok := router.routes[name]
if !ok {
return &http.Request{}, fmt.Errorf("no route exists with the name %s", name)
}
uri, err := route.CreatePath(params)
if err != nil {
return &http.Request{}, err
}
... | go | func (router Router) CreateRequest(name string, params Params, body io.Reader) (*http.Request, error) {
route, ok := router.routes[name]
if !ok {
return &http.Request{}, fmt.Errorf("no route exists with the name %s", name)
}
uri, err := route.CreatePath(params)
if err != nil {
return &http.Request{}, err
}
... | [
"func",
"(",
"router",
"Router",
")",
"CreateRequest",
"(",
"name",
"string",
",",
"params",
"Params",
",",
"body",
"io",
".",
"Reader",
")",
"(",
"*",
"http",
".",
"Request",
",",
"error",
")",
"{",
"route",
",",
"ok",
":=",
"router",
".",
"routes",... | // CreateRequest returns a request key'd off of the name given. The params are
// merged into the URL and body is set as the request body. | [
"CreateRequest",
"returns",
"a",
"request",
"key",
"d",
"off",
"of",
"the",
"name",
"given",
".",
"The",
"params",
"are",
"merged",
"into",
"the",
"URL",
"and",
"body",
"is",
"set",
"as",
"the",
"request",
"body",
"."
] | 5010c000047f246b870475e2c299556078cdad30 | https://github.com/cloudfoundry/cli/blob/5010c000047f246b870475e2c299556078cdad30/api/cloudcontroller/ccv3/internal/routing.go#L116-L138 |
25,904 | cloudfoundry/cli | api/uaa/client.go | NewClient | func NewClient(config Config) *Client {
userAgent := fmt.Sprintf("%s/%s (%s; %s %s)",
config.BinaryName(),
config.BinaryVersion(),
runtime.Version(),
runtime.GOARCH,
runtime.GOOS,
)
client := Client{
config: config,
connection: NewConnection(config.SkipSSLValidation(), config.UAADisableKeepAlives(), ... | go | func NewClient(config Config) *Client {
userAgent := fmt.Sprintf("%s/%s (%s; %s %s)",
config.BinaryName(),
config.BinaryVersion(),
runtime.Version(),
runtime.GOARCH,
runtime.GOOS,
)
client := Client{
config: config,
connection: NewConnection(config.SkipSSLValidation(), config.UAADisableKeepAlives(), ... | [
"func",
"NewClient",
"(",
"config",
"Config",
")",
"*",
"Client",
"{",
"userAgent",
":=",
"fmt",
".",
"Sprintf",
"(",
"\"",
"\"",
",",
"config",
".",
"BinaryName",
"(",
")",
",",
"config",
".",
"BinaryVersion",
"(",
")",
",",
"runtime",
".",
"Version",... | // NewClient returns a new UAA Client with the provided configuration | [
"NewClient",
"returns",
"a",
"new",
"UAA",
"Client",
"with",
"the",
"provided",
"configuration"
] | 5010c000047f246b870475e2c299556078cdad30 | https://github.com/cloudfoundry/cli/blob/5010c000047f246b870475e2c299556078cdad30/api/uaa/client.go#L27-L45 |
25,905 | cloudfoundry/cli | util/ui/ui.go | NewUI | func NewUI(config Config) (*UI, error) {
translateFunc, err := GetTranslationFunc(config)
if err != nil {
return nil, err
}
location := time.Now().Location()
return &UI{
In: os.Stdin,
Out: color.Output,
OutForInteration: os.Stdout,
Err: os.Stderr,
colorEnabled:... | go | func NewUI(config Config) (*UI, error) {
translateFunc, err := GetTranslationFunc(config)
if err != nil {
return nil, err
}
location := time.Now().Location()
return &UI{
In: os.Stdin,
Out: color.Output,
OutForInteration: os.Stdout,
Err: os.Stderr,
colorEnabled:... | [
"func",
"NewUI",
"(",
"config",
"Config",
")",
"(",
"*",
"UI",
",",
"error",
")",
"{",
"translateFunc",
",",
"err",
":=",
"GetTranslationFunc",
"(",
"config",
")",
"\n",
"if",
"err",
"!=",
"nil",
"{",
"return",
"nil",
",",
"err",
"\n",
"}",
"\n\n",
... | // NewUI will return a UI object where Out is set to STDOUT, In is set to
// STDIN, and Err is set to STDERR | [
"NewUI",
"will",
"return",
"a",
"UI",
"object",
"where",
"Out",
"is",
"set",
"to",
"STDOUT",
"In",
"is",
"set",
"to",
"STDIN",
"and",
"Err",
"is",
"set",
"to",
"STDERR"
] | 5010c000047f246b870475e2c299556078cdad30 | https://github.com/cloudfoundry/cli/blob/5010c000047f246b870475e2c299556078cdad30/util/ui/ui.go#L99-L122 |
25,906 | cloudfoundry/cli | util/ui/ui.go | DisplayError | func (ui *UI) DisplayError(err error) {
var errMsg string
if translatableError, ok := err.(translatableerror.TranslatableError); ok {
errMsg = translatableError.Translate(ui.translate)
} else {
errMsg = err.Error()
}
fmt.Fprintf(ui.Err, "%s\n", errMsg)
ui.terminalLock.Lock()
defer ui.terminalLock.Unlock()
... | go | func (ui *UI) DisplayError(err error) {
var errMsg string
if translatableError, ok := err.(translatableerror.TranslatableError); ok {
errMsg = translatableError.Translate(ui.translate)
} else {
errMsg = err.Error()
}
fmt.Fprintf(ui.Err, "%s\n", errMsg)
ui.terminalLock.Lock()
defer ui.terminalLock.Unlock()
... | [
"func",
"(",
"ui",
"*",
"UI",
")",
"DisplayError",
"(",
"err",
"error",
")",
"{",
"var",
"errMsg",
"string",
"\n",
"if",
"translatableError",
",",
"ok",
":=",
"err",
".",
"(",
"translatableerror",
".",
"TranslatableError",
")",
";",
"ok",
"{",
"errMsg",
... | // DisplayError outputs the translated error message to ui.Err if the error
// satisfies TranslatableError, otherwise it outputs the original error message
// to ui.Err. It also outputs "FAILED" in bold red to ui.Out. | [
"DisplayError",
"outputs",
"the",
"translated",
"error",
"message",
"to",
"ui",
".",
"Err",
"if",
"the",
"error",
"satisfies",
"TranslatableError",
"otherwise",
"it",
"outputs",
"the",
"original",
"error",
"message",
"to",
"ui",
".",
"Err",
".",
"It",
"also",
... | 5010c000047f246b870475e2c299556078cdad30 | https://github.com/cloudfoundry/cli/blob/5010c000047f246b870475e2c299556078cdad30/util/ui/ui.go#L157-L170 |
25,907 | cloudfoundry/cli | util/ui/ui.go | DisplayHeader | func (ui *UI) DisplayHeader(text string) {
ui.terminalLock.Lock()
defer ui.terminalLock.Unlock()
fmt.Fprintf(ui.Out, "%s\n", ui.modifyColor(ui.TranslateText(text), color.New(color.Bold)))
} | go | func (ui *UI) DisplayHeader(text string) {
ui.terminalLock.Lock()
defer ui.terminalLock.Unlock()
fmt.Fprintf(ui.Out, "%s\n", ui.modifyColor(ui.TranslateText(text), color.New(color.Bold)))
} | [
"func",
"(",
"ui",
"*",
"UI",
")",
"DisplayHeader",
"(",
"text",
"string",
")",
"{",
"ui",
".",
"terminalLock",
".",
"Lock",
"(",
")",
"\n",
"defer",
"ui",
".",
"terminalLock",
".",
"Unlock",
"(",
")",
"\n\n",
"fmt",
".",
"Fprintf",
"(",
"ui",
".",... | // DisplayHeader translates the header, bolds and adds the default color to the
// header, and outputs the result to ui.Out. | [
"DisplayHeader",
"translates",
"the",
"header",
"bolds",
"and",
"adds",
"the",
"default",
"color",
"to",
"the",
"header",
"and",
"outputs",
"the",
"result",
"to",
"ui",
".",
"Out",
"."
] | 5010c000047f246b870475e2c299556078cdad30 | https://github.com/cloudfoundry/cli/blob/5010c000047f246b870475e2c299556078cdad30/util/ui/ui.go#L181-L186 |
25,908 | cloudfoundry/cli | util/ui/ui.go | DisplayNewline | func (ui *UI) DisplayNewline() {
ui.terminalLock.Lock()
defer ui.terminalLock.Unlock()
fmt.Fprintf(ui.Out, "\n")
} | go | func (ui *UI) DisplayNewline() {
ui.terminalLock.Lock()
defer ui.terminalLock.Unlock()
fmt.Fprintf(ui.Out, "\n")
} | [
"func",
"(",
"ui",
"*",
"UI",
")",
"DisplayNewline",
"(",
")",
"{",
"ui",
".",
"terminalLock",
".",
"Lock",
"(",
")",
"\n",
"defer",
"ui",
".",
"terminalLock",
".",
"Unlock",
"(",
")",
"\n\n",
"fmt",
".",
"Fprintf",
"(",
"ui",
".",
"Out",
",",
"\... | // DisplayNewline outputs a newline to UI.Out. | [
"DisplayNewline",
"outputs",
"a",
"newline",
"to",
"UI",
".",
"Out",
"."
] | 5010c000047f246b870475e2c299556078cdad30 | https://github.com/cloudfoundry/cli/blob/5010c000047f246b870475e2c299556078cdad30/util/ui/ui.go#L189-L194 |
25,909 | cloudfoundry/cli | util/ui/ui.go | DisplayOK | func (ui *UI) DisplayOK() {
ui.terminalLock.Lock()
defer ui.terminalLock.Unlock()
fmt.Fprintf(ui.Out, "%s\n\n", ui.modifyColor(ui.TranslateText("OK"), color.New(color.FgGreen, color.Bold)))
} | go | func (ui *UI) DisplayOK() {
ui.terminalLock.Lock()
defer ui.terminalLock.Unlock()
fmt.Fprintf(ui.Out, "%s\n\n", ui.modifyColor(ui.TranslateText("OK"), color.New(color.FgGreen, color.Bold)))
} | [
"func",
"(",
"ui",
"*",
"UI",
")",
"DisplayOK",
"(",
")",
"{",
"ui",
".",
"terminalLock",
".",
"Lock",
"(",
")",
"\n",
"defer",
"ui",
".",
"terminalLock",
".",
"Unlock",
"(",
")",
"\n\n",
"fmt",
".",
"Fprintf",
"(",
"ui",
".",
"Out",
",",
"\"",
... | // DisplayOK outputs a bold green translated "OK" to UI.Out. | [
"DisplayOK",
"outputs",
"a",
"bold",
"green",
"translated",
"OK",
"to",
"UI",
".",
"Out",
"."
] | 5010c000047f246b870475e2c299556078cdad30 | https://github.com/cloudfoundry/cli/blob/5010c000047f246b870475e2c299556078cdad30/util/ui/ui.go#L197-L202 |
25,910 | cloudfoundry/cli | util/ui/ui.go | DisplayText | func (ui *UI) DisplayText(template string, templateValues ...map[string]interface{}) {
ui.terminalLock.Lock()
defer ui.terminalLock.Unlock()
fmt.Fprintf(ui.Out, "%s\n", ui.TranslateText(template, templateValues...))
} | go | func (ui *UI) DisplayText(template string, templateValues ...map[string]interface{}) {
ui.terminalLock.Lock()
defer ui.terminalLock.Unlock()
fmt.Fprintf(ui.Out, "%s\n", ui.TranslateText(template, templateValues...))
} | [
"func",
"(",
"ui",
"*",
"UI",
")",
"DisplayText",
"(",
"template",
"string",
",",
"templateValues",
"...",
"map",
"[",
"string",
"]",
"interface",
"{",
"}",
")",
"{",
"ui",
".",
"terminalLock",
".",
"Lock",
"(",
")",
"\n",
"defer",
"ui",
".",
"termin... | // DisplayText translates the template, substitutes in templateValues, and
// outputs the result to ui.Out. Only the first map in templateValues is used. | [
"DisplayText",
"translates",
"the",
"template",
"substitutes",
"in",
"templateValues",
"and",
"outputs",
"the",
"result",
"to",
"ui",
".",
"Out",
".",
"Only",
"the",
"first",
"map",
"in",
"templateValues",
"is",
"used",
"."
] | 5010c000047f246b870475e2c299556078cdad30 | https://github.com/cloudfoundry/cli/blob/5010c000047f246b870475e2c299556078cdad30/util/ui/ui.go#L206-L211 |
25,911 | cloudfoundry/cli | util/ui/ui.go | DisplayTextWithFlavor | func (ui *UI) DisplayTextWithFlavor(template string, templateValues ...map[string]interface{}) {
ui.terminalLock.Lock()
defer ui.terminalLock.Unlock()
firstTemplateValues := getFirstSet(templateValues)
for key, value := range firstTemplateValues {
firstTemplateValues[key] = ui.modifyColor(fmt.Sprint(value), colo... | go | func (ui *UI) DisplayTextWithFlavor(template string, templateValues ...map[string]interface{}) {
ui.terminalLock.Lock()
defer ui.terminalLock.Unlock()
firstTemplateValues := getFirstSet(templateValues)
for key, value := range firstTemplateValues {
firstTemplateValues[key] = ui.modifyColor(fmt.Sprint(value), colo... | [
"func",
"(",
"ui",
"*",
"UI",
")",
"DisplayTextWithFlavor",
"(",
"template",
"string",
",",
"templateValues",
"...",
"map",
"[",
"string",
"]",
"interface",
"{",
"}",
")",
"{",
"ui",
".",
"terminalLock",
".",
"Lock",
"(",
")",
"\n",
"defer",
"ui",
".",... | // DisplayTextWithFlavor translates the template, bolds and adds cyan color to
// templateValues, substitutes templateValues into the template, and outputs
// the result to ui.Out. Only the first map in templateValues is used. | [
"DisplayTextWithFlavor",
"translates",
"the",
"template",
"bolds",
"and",
"adds",
"cyan",
"color",
"to",
"templateValues",
"substitutes",
"templateValues",
"into",
"the",
"template",
"and",
"outputs",
"the",
"result",
"to",
"ui",
".",
"Out",
".",
"Only",
"the",
... | 5010c000047f246b870475e2c299556078cdad30 | https://github.com/cloudfoundry/cli/blob/5010c000047f246b870475e2c299556078cdad30/util/ui/ui.go#L230-L239 |
25,912 | cloudfoundry/cli | util/ui/ui.go | DisplayWarning | func (ui *UI) DisplayWarning(template string, templateValues ...map[string]interface{}) {
fmt.Fprintf(ui.Err, "%s\n\n", ui.TranslateText(template, templateValues...))
} | go | func (ui *UI) DisplayWarning(template string, templateValues ...map[string]interface{}) {
fmt.Fprintf(ui.Err, "%s\n\n", ui.TranslateText(template, templateValues...))
} | [
"func",
"(",
"ui",
"*",
"UI",
")",
"DisplayWarning",
"(",
"template",
"string",
",",
"templateValues",
"...",
"map",
"[",
"string",
"]",
"interface",
"{",
"}",
")",
"{",
"fmt",
".",
"Fprintf",
"(",
"ui",
".",
"Err",
",",
"\"",
"\\n",
"\\n",
"\"",
"... | // DisplayWarning translates the warning, substitutes in templateValues, and
// outputs to ui.Err. Only the first map in templateValues is used. | [
"DisplayWarning",
"translates",
"the",
"warning",
"substitutes",
"in",
"templateValues",
"and",
"outputs",
"to",
"ui",
".",
"Err",
".",
"Only",
"the",
"first",
"map",
"in",
"templateValues",
"is",
"used",
"."
] | 5010c000047f246b870475e2c299556078cdad30 | https://github.com/cloudfoundry/cli/blob/5010c000047f246b870475e2c299556078cdad30/util/ui/ui.go#L243-L245 |
25,913 | cloudfoundry/cli | util/ui/ui.go | DisplayWarnings | func (ui *UI) DisplayWarnings(warnings []string) {
for _, warning := range warnings {
fmt.Fprintf(ui.Err, "%s\n", ui.TranslateText(warning))
}
if len(warnings) > 0 {
fmt.Fprintln(ui.Err)
}
} | go | func (ui *UI) DisplayWarnings(warnings []string) {
for _, warning := range warnings {
fmt.Fprintf(ui.Err, "%s\n", ui.TranslateText(warning))
}
if len(warnings) > 0 {
fmt.Fprintln(ui.Err)
}
} | [
"func",
"(",
"ui",
"*",
"UI",
")",
"DisplayWarnings",
"(",
"warnings",
"[",
"]",
"string",
")",
"{",
"for",
"_",
",",
"warning",
":=",
"range",
"warnings",
"{",
"fmt",
".",
"Fprintf",
"(",
"ui",
".",
"Err",
",",
"\"",
"\\n",
"\"",
",",
"ui",
".",... | // DisplayWarnings translates the warnings and outputs to ui.Err. | [
"DisplayWarnings",
"translates",
"the",
"warnings",
"and",
"outputs",
"to",
"ui",
".",
"Err",
"."
] | 5010c000047f246b870475e2c299556078cdad30 | https://github.com/cloudfoundry/cli/blob/5010c000047f246b870475e2c299556078cdad30/util/ui/ui.go#L248-L255 |
25,914 | cloudfoundry/cli | util/ui/ui.go | TranslateText | func (ui *UI) TranslateText(template string, templateValues ...map[string]interface{}) string {
return ui.translate(template, getFirstSet(templateValues))
} | go | func (ui *UI) TranslateText(template string, templateValues ...map[string]interface{}) string {
return ui.translate(template, getFirstSet(templateValues))
} | [
"func",
"(",
"ui",
"*",
"UI",
")",
"TranslateText",
"(",
"template",
"string",
",",
"templateValues",
"...",
"map",
"[",
"string",
"]",
"interface",
"{",
"}",
")",
"string",
"{",
"return",
"ui",
".",
"translate",
"(",
"template",
",",
"getFirstSet",
"(",... | // TranslateText passes the template through an internationalization function
// to translate it to a pre-configured language, and returns the template with
// templateValues substituted in. Only the first map in templateValues is used. | [
"TranslateText",
"passes",
"the",
"template",
"through",
"an",
"internationalization",
"function",
"to",
"translate",
"it",
"to",
"a",
"pre",
"-",
"configured",
"language",
"and",
"returns",
"the",
"template",
"with",
"templateValues",
"substituted",
"in",
".",
"O... | 5010c000047f246b870475e2c299556078cdad30 | https://github.com/cloudfoundry/cli/blob/5010c000047f246b870475e2c299556078cdad30/util/ui/ui.go#L275-L277 |
25,915 | cloudfoundry/cli | util/ui/ui.go | UserFriendlyDate | func (ui *UI) UserFriendlyDate(input time.Time) string {
return input.Local().Format("Mon 02 Jan 15:04:05 MST 2006")
} | go | func (ui *UI) UserFriendlyDate(input time.Time) string {
return input.Local().Format("Mon 02 Jan 15:04:05 MST 2006")
} | [
"func",
"(",
"ui",
"*",
"UI",
")",
"UserFriendlyDate",
"(",
"input",
"time",
".",
"Time",
")",
"string",
"{",
"return",
"input",
".",
"Local",
"(",
")",
".",
"Format",
"(",
"\"",
"\"",
")",
"\n",
"}"
] | // UserFriendlyDate converts the time to UTC and then formats it to ISO8601. | [
"UserFriendlyDate",
"converts",
"the",
"time",
"to",
"UTC",
"and",
"then",
"formats",
"it",
"to",
"ISO8601",
"."
] | 5010c000047f246b870475e2c299556078cdad30 | https://github.com/cloudfoundry/cli/blob/5010c000047f246b870475e2c299556078cdad30/util/ui/ui.go#L280-L282 |
25,916 | cloudfoundry/cli | util/configv3/plugin_repository.go | AddPluginRepository | func (config *Config) AddPluginRepository(name string, url string) {
config.ConfigFile.PluginRepositories = append(config.ConfigFile.PluginRepositories,
PluginRepository{Name: name, URL: url})
} | go | func (config *Config) AddPluginRepository(name string, url string) {
config.ConfigFile.PluginRepositories = append(config.ConfigFile.PluginRepositories,
PluginRepository{Name: name, URL: url})
} | [
"func",
"(",
"config",
"*",
"Config",
")",
"AddPluginRepository",
"(",
"name",
"string",
",",
"url",
"string",
")",
"{",
"config",
".",
"ConfigFile",
".",
"PluginRepositories",
"=",
"append",
"(",
"config",
".",
"ConfigFile",
".",
"PluginRepositories",
",",
... | // AddPluginRepository adds an new repository to the plugin config. It does not
// add duplicates to the config. | [
"AddPluginRepository",
"adds",
"an",
"new",
"repository",
"to",
"the",
"plugin",
"config",
".",
"It",
"does",
"not",
"add",
"duplicates",
"to",
"the",
"config",
"."
] | 5010c000047f246b870475e2c299556078cdad30 | https://github.com/cloudfoundry/cli/blob/5010c000047f246b870475e2c299556078cdad30/util/configv3/plugin_repository.go#L24-L27 |
25,917 | cloudfoundry/cli | util/ui/ui_for_push.go | DisplayChangesForPush | func (ui *UI) DisplayChangesForPush(changeSet []Change) error {
if len(changeSet) == 0 {
return nil
}
var columnWidth int
for _, change := range changeSet {
if width := wordSize(ui.TranslateText(change.Header)); width > columnWidth {
columnWidth = width
}
}
for _, change := range changeSet {
padding ... | go | func (ui *UI) DisplayChangesForPush(changeSet []Change) error {
if len(changeSet) == 0 {
return nil
}
var columnWidth int
for _, change := range changeSet {
if width := wordSize(ui.TranslateText(change.Header)); width > columnWidth {
columnWidth = width
}
}
for _, change := range changeSet {
padding ... | [
"func",
"(",
"ui",
"*",
"UI",
")",
"DisplayChangesForPush",
"(",
"changeSet",
"[",
"]",
"Change",
")",
"error",
"{",
"if",
"len",
"(",
"changeSet",
")",
"==",
"0",
"{",
"return",
"nil",
"\n",
"}",
"\n\n",
"var",
"columnWidth",
"int",
"\n",
"for",
"_"... | // DisplayChangesForPush will display the set of changes via
// DisplayChangeForPush in the order given. | [
"DisplayChangesForPush",
"will",
"display",
"the",
"set",
"of",
"changes",
"via",
"DisplayChangeForPush",
"in",
"the",
"order",
"given",
"."
] | 5010c000047f246b870475e2c299556078cdad30 | https://github.com/cloudfoundry/cli/blob/5010c000047f246b870475e2c299556078cdad30/util/ui/ui_for_push.go#L73-L94 |
25,918 | cloudfoundry/cli | actor/v2action/service_instance.go | CreateServiceInstance | func (actor Actor) CreateServiceInstance(spaceGUID, serviceName, servicePlanName, serviceInstanceName, brokerName string, params map[string]interface{}, tags []string) (ServiceInstance, Warnings, error) {
var allWarnings Warnings
plan, allWarnings, err := actor.getServicePlanForServiceInSpace(servicePlanName, service... | go | func (actor Actor) CreateServiceInstance(spaceGUID, serviceName, servicePlanName, serviceInstanceName, brokerName string, params map[string]interface{}, tags []string) (ServiceInstance, Warnings, error) {
var allWarnings Warnings
plan, allWarnings, err := actor.getServicePlanForServiceInSpace(servicePlanName, service... | [
"func",
"(",
"actor",
"Actor",
")",
"CreateServiceInstance",
"(",
"spaceGUID",
",",
"serviceName",
",",
"servicePlanName",
",",
"serviceInstanceName",
",",
"brokerName",
"string",
",",
"params",
"map",
"[",
"string",
"]",
"interface",
"{",
"}",
",",
"tags",
"[... | // CreateServiceInstance creates a new service instance with the provided attributes. | [
"CreateServiceInstance",
"creates",
"a",
"new",
"service",
"instance",
"with",
"the",
"provided",
"attributes",
"."
] | 5010c000047f246b870475e2c299556078cdad30 | https://github.com/cloudfoundry/cli/blob/5010c000047f246b870475e2c299556078cdad30/actor/v2action/service_instance.go#L14-L29 |
25,919 | cloudfoundry/cli | actor/v2action/route.go | Summary | func (rs Routes) Summary() string {
formattedRoutes := []string{}
for _, route := range rs {
formattedRoutes = append(formattedRoutes, route.String())
}
return strings.Join(formattedRoutes, ", ")
} | go | func (rs Routes) Summary() string {
formattedRoutes := []string{}
for _, route := range rs {
formattedRoutes = append(formattedRoutes, route.String())
}
return strings.Join(formattedRoutes, ", ")
} | [
"func",
"(",
"rs",
"Routes",
")",
"Summary",
"(",
")",
"string",
"{",
"formattedRoutes",
":=",
"[",
"]",
"string",
"{",
"}",
"\n",
"for",
"_",
",",
"route",
":=",
"range",
"rs",
"{",
"formattedRoutes",
"=",
"append",
"(",
"formattedRoutes",
",",
"route... | // Summary converts routes into a comma separated string. | [
"Summary",
"converts",
"routes",
"into",
"a",
"comma",
"separated",
"string",
"."
] | 5010c000047f246b870475e2c299556078cdad30 | https://github.com/cloudfoundry/cli/blob/5010c000047f246b870475e2c299556078cdad30/actor/v2action/route.go#L19-L25 |
25,920 | cloudfoundry/cli | actor/v2action/route.go | Validate | func (r Route) Validate() error {
if r.Domain.IsHTTP() {
if r.Port.IsSet {
return actionerror.InvalidHTTPRouteSettings{Domain: r.Domain.Name}
}
if r.Domain.IsShared() && r.Host == "" {
return actionerror.NoHostnameAndSharedDomainError{}
}
} else { // Is TCP Domain
if r.Host != "" || r.Path != "" {
... | go | func (r Route) Validate() error {
if r.Domain.IsHTTP() {
if r.Port.IsSet {
return actionerror.InvalidHTTPRouteSettings{Domain: r.Domain.Name}
}
if r.Domain.IsShared() && r.Host == "" {
return actionerror.NoHostnameAndSharedDomainError{}
}
} else { // Is TCP Domain
if r.Host != "" || r.Path != "" {
... | [
"func",
"(",
"r",
"Route",
")",
"Validate",
"(",
")",
"error",
"{",
"if",
"r",
".",
"Domain",
".",
"IsHTTP",
"(",
")",
"{",
"if",
"r",
".",
"Port",
".",
"IsSet",
"{",
"return",
"actionerror",
".",
"InvalidHTTPRouteSettings",
"{",
"Domain",
":",
"r",
... | // Validate will return an error if there are invalid HTTP or TCP settings for
// it's given domain. | [
"Validate",
"will",
"return",
"an",
"error",
"if",
"there",
"are",
"invalid",
"HTTP",
"or",
"TCP",
"settings",
"for",
"it",
"s",
"given",
"domain",
"."
] | 5010c000047f246b870475e2c299556078cdad30 | https://github.com/cloudfoundry/cli/blob/5010c000047f246b870475e2c299556078cdad30/actor/v2action/route.go#L43-L57 |
25,921 | cloudfoundry/cli | actor/v2action/route.go | ValidateWithRandomPort | func (r Route) ValidateWithRandomPort(randomPort bool) error {
if r.Domain.IsHTTP() && randomPort {
return actionerror.InvalidHTTPRouteSettings{Domain: r.Domain.Name}
}
if r.Domain.IsTCP() && !r.Port.IsSet && !randomPort {
return actionerror.TCPRouteOptionsNotProvidedError{}
}
return r.Validate()
} | go | func (r Route) ValidateWithRandomPort(randomPort bool) error {
if r.Domain.IsHTTP() && randomPort {
return actionerror.InvalidHTTPRouteSettings{Domain: r.Domain.Name}
}
if r.Domain.IsTCP() && !r.Port.IsSet && !randomPort {
return actionerror.TCPRouteOptionsNotProvidedError{}
}
return r.Validate()
} | [
"func",
"(",
"r",
"Route",
")",
"ValidateWithRandomPort",
"(",
"randomPort",
"bool",
")",
"error",
"{",
"if",
"r",
".",
"Domain",
".",
"IsHTTP",
"(",
")",
"&&",
"randomPort",
"{",
"return",
"actionerror",
".",
"InvalidHTTPRouteSettings",
"{",
"Domain",
":",
... | // ValidateWithRandomPort will return an error if a random port is requested
// for an HTTP route, or if the route is TCP, a random port wasn't requested,
// and the route has no port set. | [
"ValidateWithRandomPort",
"will",
"return",
"an",
"error",
"if",
"a",
"random",
"port",
"is",
"requested",
"for",
"an",
"HTTP",
"route",
"or",
"if",
"the",
"route",
"is",
"TCP",
"a",
"random",
"port",
"wasn",
"t",
"requested",
"and",
"the",
"route",
"has",... | 5010c000047f246b870475e2c299556078cdad30 | https://github.com/cloudfoundry/cli/blob/5010c000047f246b870475e2c299556078cdad30/actor/v2action/route.go#L62-L71 |
25,922 | cloudfoundry/cli | actor/v2action/route.go | String | func (r Route) String() string {
routeString := r.Domain.Name
if r.Port.IsSet {
routeString = fmt.Sprintf("%s:%d", routeString, r.Port.Value)
} else if r.RandomTCPPort() {
routeString = fmt.Sprintf("%s:????", routeString)
}
if r.Host != "" {
routeString = fmt.Sprintf("%s.%s", r.Host, routeString)
}
if r... | go | func (r Route) String() string {
routeString := r.Domain.Name
if r.Port.IsSet {
routeString = fmt.Sprintf("%s:%d", routeString, r.Port.Value)
} else if r.RandomTCPPort() {
routeString = fmt.Sprintf("%s:????", routeString)
}
if r.Host != "" {
routeString = fmt.Sprintf("%s.%s", r.Host, routeString)
}
if r... | [
"func",
"(",
"r",
"Route",
")",
"String",
"(",
")",
"string",
"{",
"routeString",
":=",
"r",
".",
"Domain",
".",
"Name",
"\n\n",
"if",
"r",
".",
"Port",
".",
"IsSet",
"{",
"routeString",
"=",
"fmt",
".",
"Sprintf",
"(",
"\"",
"\"",
",",
"routeStrin... | // String formats the route in a human readable format. | [
"String",
"formats",
"the",
"route",
"in",
"a",
"human",
"readable",
"format",
"."
] | 5010c000047f246b870475e2c299556078cdad30 | https://github.com/cloudfoundry/cli/blob/5010c000047f246b870475e2c299556078cdad30/actor/v2action/route.go#L74-L92 |
25,923 | cloudfoundry/cli | actor/v2action/route.go | GetOrphanedRoutesBySpace | func (actor Actor) GetOrphanedRoutesBySpace(spaceGUID string) ([]Route, Warnings, error) {
var (
orphanedRoutes []Route
allWarnings Warnings
)
routes, warnings, err := actor.GetSpaceRoutes(spaceGUID)
allWarnings = append(allWarnings, warnings...)
if err != nil {
return nil, allWarnings, err
}
for _, r... | go | func (actor Actor) GetOrphanedRoutesBySpace(spaceGUID string) ([]Route, Warnings, error) {
var (
orphanedRoutes []Route
allWarnings Warnings
)
routes, warnings, err := actor.GetSpaceRoutes(spaceGUID)
allWarnings = append(allWarnings, warnings...)
if err != nil {
return nil, allWarnings, err
}
for _, r... | [
"func",
"(",
"actor",
"Actor",
")",
"GetOrphanedRoutesBySpace",
"(",
"spaceGUID",
"string",
")",
"(",
"[",
"]",
"Route",
",",
"Warnings",
",",
"error",
")",
"{",
"var",
"(",
"orphanedRoutes",
"[",
"]",
"Route",
"\n",
"allWarnings",
"Warnings",
"\n",
")",
... | // GetOrphanedRoutesBySpace returns a list of orphaned routes associated with
// the provided Space GUID. | [
"GetOrphanedRoutesBySpace",
"returns",
"a",
"list",
"of",
"orphaned",
"routes",
"associated",
"with",
"the",
"provided",
"Space",
"GUID",
"."
] | 5010c000047f246b870475e2c299556078cdad30 | https://github.com/cloudfoundry/cli/blob/5010c000047f246b870475e2c299556078cdad30/actor/v2action/route.go#L165-L194 |
25,924 | cloudfoundry/cli | actor/v2action/route.go | GetApplicationRoutes | func (actor Actor) GetApplicationRoutes(applicationGUID string) (Routes, Warnings, error) {
var allWarnings Warnings
ccv2Routes, warnings, err := actor.CloudControllerClient.GetApplicationRoutes(applicationGUID)
allWarnings = append(allWarnings, warnings...)
if err != nil {
return nil, allWarnings, err
}
route... | go | func (actor Actor) GetApplicationRoutes(applicationGUID string) (Routes, Warnings, error) {
var allWarnings Warnings
ccv2Routes, warnings, err := actor.CloudControllerClient.GetApplicationRoutes(applicationGUID)
allWarnings = append(allWarnings, warnings...)
if err != nil {
return nil, allWarnings, err
}
route... | [
"func",
"(",
"actor",
"Actor",
")",
"GetApplicationRoutes",
"(",
"applicationGUID",
"string",
")",
"(",
"Routes",
",",
"Warnings",
",",
"error",
")",
"{",
"var",
"allWarnings",
"Warnings",
"\n",
"ccv2Routes",
",",
"warnings",
",",
"err",
":=",
"actor",
".",
... | // GetApplicationRoutes returns a list of routes associated with the provided
// Application GUID. | [
"GetApplicationRoutes",
"returns",
"a",
"list",
"of",
"routes",
"associated",
"with",
"the",
"provided",
"Application",
"GUID",
"."
] | 5010c000047f246b870475e2c299556078cdad30 | https://github.com/cloudfoundry/cli/blob/5010c000047f246b870475e2c299556078cdad30/actor/v2action/route.go#L198-L209 |
25,925 | cloudfoundry/cli | actor/v2action/route.go | GetSpaceRoutes | func (actor Actor) GetSpaceRoutes(spaceGUID string) ([]Route, Warnings, error) {
var allWarnings Warnings
ccv2Routes, warnings, err := actor.CloudControllerClient.GetSpaceRoutes(spaceGUID)
allWarnings = append(allWarnings, warnings...)
if err != nil {
return nil, allWarnings, err
}
routes, domainWarnings, err ... | go | func (actor Actor) GetSpaceRoutes(spaceGUID string) ([]Route, Warnings, error) {
var allWarnings Warnings
ccv2Routes, warnings, err := actor.CloudControllerClient.GetSpaceRoutes(spaceGUID)
allWarnings = append(allWarnings, warnings...)
if err != nil {
return nil, allWarnings, err
}
routes, domainWarnings, err ... | [
"func",
"(",
"actor",
"Actor",
")",
"GetSpaceRoutes",
"(",
"spaceGUID",
"string",
")",
"(",
"[",
"]",
"Route",
",",
"Warnings",
",",
"error",
")",
"{",
"var",
"allWarnings",
"Warnings",
"\n",
"ccv2Routes",
",",
"warnings",
",",
"err",
":=",
"actor",
".",... | // GetSpaceRoutes returns a list of routes associated with the provided Space
// GUID. | [
"GetSpaceRoutes",
"returns",
"a",
"list",
"of",
"routes",
"associated",
"with",
"the",
"provided",
"Space",
"GUID",
"."
] | 5010c000047f246b870475e2c299556078cdad30 | https://github.com/cloudfoundry/cli/blob/5010c000047f246b870475e2c299556078cdad30/actor/v2action/route.go#L213-L224 |
25,926 | cloudfoundry/cli | actor/v2action/route.go | DeleteUnmappedRoutes | func (actor Actor) DeleteUnmappedRoutes(spaceGUID string) (Warnings, error) {
warnings, err := actor.CloudControllerClient.DeleteSpaceUnmappedRoutes(spaceGUID)
return Warnings(warnings), err
} | go | func (actor Actor) DeleteUnmappedRoutes(spaceGUID string) (Warnings, error) {
warnings, err := actor.CloudControllerClient.DeleteSpaceUnmappedRoutes(spaceGUID)
return Warnings(warnings), err
} | [
"func",
"(",
"actor",
"Actor",
")",
"DeleteUnmappedRoutes",
"(",
"spaceGUID",
"string",
")",
"(",
"Warnings",
",",
"error",
")",
"{",
"warnings",
",",
"err",
":=",
"actor",
".",
"CloudControllerClient",
".",
"DeleteSpaceUnmappedRoutes",
"(",
"spaceGUID",
")",
... | // DeleteUnmappedRoutes deletes the unmapped routes associated with the provided Space GUID. | [
"DeleteUnmappedRoutes",
"deletes",
"the",
"unmapped",
"routes",
"associated",
"with",
"the",
"provided",
"Space",
"GUID",
"."
] | 5010c000047f246b870475e2c299556078cdad30 | https://github.com/cloudfoundry/cli/blob/5010c000047f246b870475e2c299556078cdad30/actor/v2action/route.go#L227-L230 |
25,927 | cloudfoundry/cli | actor/v2action/route.go | FindRouteBoundToSpaceWithSettings | func (actor Actor) FindRouteBoundToSpaceWithSettings(route Route) (Route, Warnings, error) {
existingRoute, warnings, err := actor.GetRouteByComponents(route)
if routeNotFoundErr, ok := err.(actionerror.RouteNotFoundError); ok {
// This check only works for API versions 2.55 or higher. It will return
// false for... | go | func (actor Actor) FindRouteBoundToSpaceWithSettings(route Route) (Route, Warnings, error) {
existingRoute, warnings, err := actor.GetRouteByComponents(route)
if routeNotFoundErr, ok := err.(actionerror.RouteNotFoundError); ok {
// This check only works for API versions 2.55 or higher. It will return
// false for... | [
"func",
"(",
"actor",
"Actor",
")",
"FindRouteBoundToSpaceWithSettings",
"(",
"route",
"Route",
")",
"(",
"Route",
",",
"Warnings",
",",
"error",
")",
"{",
"existingRoute",
",",
"warnings",
",",
"err",
":=",
"actor",
".",
"GetRouteByComponents",
"(",
"route",
... | // FindRouteBoundToSpaceWithSettings finds the route with the given host,
// domain and space. If it is unable to find the route, it will check if it
// exists anywhere in the system. When the route exists in another space,
// RouteInDifferentSpaceError is returned. Use this when you know the space
// GUID. | [
"FindRouteBoundToSpaceWithSettings",
"finds",
"the",
"route",
"with",
"the",
"given",
"host",
"domain",
"and",
"space",
".",
"If",
"it",
"is",
"unable",
"to",
"find",
"the",
"route",
"it",
"will",
"check",
"if",
"it",
"exists",
"anywhere",
"in",
"the",
"syst... | 5010c000047f246b870475e2c299556078cdad30 | https://github.com/cloudfoundry/cli/blob/5010c000047f246b870475e2c299556078cdad30/actor/v2action/route.go#L248-L285 |
25,928 | cloudfoundry/cli | actor/v2action/route.go | GetRouteByComponents | func (actor Actor) GetRouteByComponents(route Route) (Route, Warnings, error) {
// TODO: validation should probably be done separately (?)
if route.Domain.IsTCP() && !route.Port.IsSet {
return Route{}, nil, actionerror.PortNotProvidedForQueryError{}
}
if route.Domain.IsShared() && route.Domain.IsHTTP() && route.... | go | func (actor Actor) GetRouteByComponents(route Route) (Route, Warnings, error) {
// TODO: validation should probably be done separately (?)
if route.Domain.IsTCP() && !route.Port.IsSet {
return Route{}, nil, actionerror.PortNotProvidedForQueryError{}
}
if route.Domain.IsShared() && route.Domain.IsHTTP() && route.... | [
"func",
"(",
"actor",
"Actor",
")",
"GetRouteByComponents",
"(",
"route",
"Route",
")",
"(",
"Route",
",",
"Warnings",
",",
"error",
")",
"{",
"// TODO: validation should probably be done separately (?)",
"if",
"route",
".",
"Domain",
".",
"IsTCP",
"(",
")",
"&&... | // GetRouteByComponents returns the route with the matching host, domain, path,
// and port. Use this when you don't know the space GUID.
// TCP routes require a port to be uniquely identified
// HTTP routes using shared domains require a hostname or path to be uniquely identified | [
"GetRouteByComponents",
"returns",
"the",
"route",
"with",
"the",
"matching",
"host",
"domain",
"path",
"and",
"port",
".",
"Use",
"this",
"when",
"you",
"don",
"t",
"know",
"the",
"space",
"GUID",
".",
"TCP",
"routes",
"require",
"a",
"port",
"to",
"be",
... | 5010c000047f246b870475e2c299556078cdad30 | https://github.com/cloudfoundry/cli/blob/5010c000047f246b870475e2c299556078cdad30/actor/v2action/route.go#L291-L340 |
25,929 | cloudfoundry/cli | actor/sharedaction/resource.go | ToV3Resource | func (r Resource) ToV3Resource() V3Resource {
return V3Resource{
FilePath: r.Filename,
Mode: r.Mode,
Checksum: ccv3.Checksum{Value: r.SHA1},
SizeInBytes: r.Size,
}
} | go | func (r Resource) ToV3Resource() V3Resource {
return V3Resource{
FilePath: r.Filename,
Mode: r.Mode,
Checksum: ccv3.Checksum{Value: r.SHA1},
SizeInBytes: r.Size,
}
} | [
"func",
"(",
"r",
"Resource",
")",
"ToV3Resource",
"(",
")",
"V3Resource",
"{",
"return",
"V3Resource",
"{",
"FilePath",
":",
"r",
".",
"Filename",
",",
"Mode",
":",
"r",
".",
"Mode",
",",
"Checksum",
":",
"ccv3",
".",
"Checksum",
"{",
"Value",
":",
... | // ToV3Resource converts a sharedaction Resource to V3 Resource format | [
"ToV3Resource",
"converts",
"a",
"sharedaction",
"Resource",
"to",
"V3",
"Resource",
"format"
] | 5010c000047f246b870475e2c299556078cdad30 | https://github.com/cloudfoundry/cli/blob/5010c000047f246b870475e2c299556078cdad30/actor/sharedaction/resource.go#L49-L56 |
25,930 | cloudfoundry/cli | actor/sharedaction/resource.go | ToV2Resource | func (r V3Resource) ToV2Resource() Resource {
return Resource{
Filename: r.FilePath,
Mode: r.Mode,
SHA1: r.Checksum.Value,
Size: r.SizeInBytes,
}
} | go | func (r V3Resource) ToV2Resource() Resource {
return Resource{
Filename: r.FilePath,
Mode: r.Mode,
SHA1: r.Checksum.Value,
Size: r.SizeInBytes,
}
} | [
"func",
"(",
"r",
"V3Resource",
")",
"ToV2Resource",
"(",
")",
"Resource",
"{",
"return",
"Resource",
"{",
"Filename",
":",
"r",
".",
"FilePath",
",",
"Mode",
":",
"r",
".",
"Mode",
",",
"SHA1",
":",
"r",
".",
"Checksum",
".",
"Value",
",",
"Size",
... | // ToV2Resource converts a V3 Resource to V2 Resource format | [
"ToV2Resource",
"converts",
"a",
"V3",
"Resource",
"to",
"V2",
"Resource",
"format"
] | 5010c000047f246b870475e2c299556078cdad30 | https://github.com/cloudfoundry/cli/blob/5010c000047f246b870475e2c299556078cdad30/actor/sharedaction/resource.go#L59-L66 |
25,931 | cloudfoundry/cli | actor/sharedaction/resource.go | GatherArchiveResources | func (actor Actor) GatherArchiveResources(archivePath string) ([]Resource, error) {
var resources []Resource
archive, err := os.Open(archivePath)
if err != nil {
return nil, err
}
defer archive.Close()
reader, err := actor.newArchiveReader(archive)
if err != nil {
return nil, err
}
gitIgnore, err := act... | go | func (actor Actor) GatherArchiveResources(archivePath string) ([]Resource, error) {
var resources []Resource
archive, err := os.Open(archivePath)
if err != nil {
return nil, err
}
defer archive.Close()
reader, err := actor.newArchiveReader(archive)
if err != nil {
return nil, err
}
gitIgnore, err := act... | [
"func",
"(",
"actor",
"Actor",
")",
"GatherArchiveResources",
"(",
"archivePath",
"string",
")",
"(",
"[",
"]",
"Resource",
",",
"error",
")",
"{",
"var",
"resources",
"[",
"]",
"Resource",
"\n\n",
"archive",
",",
"err",
":=",
"os",
".",
"Open",
"(",
"... | // GatherArchiveResources returns a list of resources for an archive. | [
"GatherArchiveResources",
"returns",
"a",
"list",
"of",
"resources",
"for",
"an",
"archive",
"."
] | 5010c000047f246b870475e2c299556078cdad30 | https://github.com/cloudfoundry/cli/blob/5010c000047f246b870475e2c299556078cdad30/actor/sharedaction/resource.go#L69-L128 |
25,932 | cloudfoundry/cli | actor/sharedaction/resource.go | GatherDirectoryResources | func (actor Actor) GatherDirectoryResources(sourceDir string) ([]Resource, error) {
var (
resources []Resource
gitIgnore *ignore.GitIgnore
)
gitIgnore, err := actor.generateDirectoryCFIgnoreMatcher(sourceDir)
if err != nil {
log.Errorln("reading .cfignore file:", err)
return nil, err
}
evalDir, err := f... | go | func (actor Actor) GatherDirectoryResources(sourceDir string) ([]Resource, error) {
var (
resources []Resource
gitIgnore *ignore.GitIgnore
)
gitIgnore, err := actor.generateDirectoryCFIgnoreMatcher(sourceDir)
if err != nil {
log.Errorln("reading .cfignore file:", err)
return nil, err
}
evalDir, err := f... | [
"func",
"(",
"actor",
"Actor",
")",
"GatherDirectoryResources",
"(",
"sourceDir",
"string",
")",
"(",
"[",
"]",
"Resource",
",",
"error",
")",
"{",
"var",
"(",
"resources",
"[",
"]",
"Resource",
"\n",
"gitIgnore",
"*",
"ignore",
".",
"GitIgnore",
"\n",
"... | // GatherDirectoryResources returns a list of resources for a directory. | [
"GatherDirectoryResources",
"returns",
"a",
"list",
"of",
"resources",
"for",
"a",
"directory",
"."
] | 5010c000047f246b870475e2c299556078cdad30 | https://github.com/cloudfoundry/cli/blob/5010c000047f246b870475e2c299556078cdad30/actor/sharedaction/resource.go#L131-L210 |
25,933 | cloudfoundry/cli | api/cloudcontroller/ccv2/application.go | MarshalJSON | func (application Application) MarshalJSON() ([]byte, error) {
ccApp := struct {
Buildpack *string `json:"buildpack,omitempty"`
Command *string `json:"command,omitempty"`
DiskQuota *uint64 ... | go | func (application Application) MarshalJSON() ([]byte, error) {
ccApp := struct {
Buildpack *string `json:"buildpack,omitempty"`
Command *string `json:"command,omitempty"`
DiskQuota *uint64 ... | [
"func",
"(",
"application",
"Application",
")",
"MarshalJSON",
"(",
")",
"(",
"[",
"]",
"byte",
",",
"error",
")",
"{",
"ccApp",
":=",
"struct",
"{",
"Buildpack",
"*",
"string",
"`json:\"buildpack,omitempty\"`",
"\n",
"Command",
"*",
"string",
"`json:\"command... | // MarshalJSON converts an application into a Cloud Controller Application. | [
"MarshalJSON",
"converts",
"an",
"application",
"into",
"a",
"Cloud",
"Controller",
"Application",
"."
] | 5010c000047f246b870475e2c299556078cdad30 | https://github.com/cloudfoundry/cli/blob/5010c000047f246b870475e2c299556078cdad30/api/cloudcontroller/ccv2/application.go#L89-L149 |
25,934 | cloudfoundry/cli | api/cloudcontroller/ccv2/application.go | CreateApplication | func (client *Client) CreateApplication(app Application) (Application, Warnings, error) {
body, err := json.Marshal(app)
if err != nil {
return Application{}, nil, err
}
request, err := client.newHTTPRequest(requestOptions{
RequestName: internal.PostAppRequest,
Body: bytes.NewReader(body),
})
if err... | go | func (client *Client) CreateApplication(app Application) (Application, Warnings, error) {
body, err := json.Marshal(app)
if err != nil {
return Application{}, nil, err
}
request, err := client.newHTTPRequest(requestOptions{
RequestName: internal.PostAppRequest,
Body: bytes.NewReader(body),
})
if err... | [
"func",
"(",
"client",
"*",
"Client",
")",
"CreateApplication",
"(",
"app",
"Application",
")",
"(",
"Application",
",",
"Warnings",
",",
"error",
")",
"{",
"body",
",",
"err",
":=",
"json",
".",
"Marshal",
"(",
"app",
")",
"\n",
"if",
"err",
"!=",
"... | // CreateApplication creates a cloud controller application in with the given
// settings. SpaceGUID and Name are the only required fields. | [
"CreateApplication",
"creates",
"a",
"cloud",
"controller",
"application",
"in",
"with",
"the",
"given",
"settings",
".",
"SpaceGUID",
"and",
"Name",
"are",
"the",
"only",
"required",
"fields",
"."
] | 5010c000047f246b870475e2c299556078cdad30 | https://github.com/cloudfoundry/cli/blob/5010c000047f246b870475e2c299556078cdad30/api/cloudcontroller/ccv2/application.go#L227-L248 |
25,935 | cloudfoundry/cli | api/cloudcontroller/ccv2/application.go | GetApplication | func (client *Client) GetApplication(guid string) (Application, Warnings, error) {
request, err := client.newHTTPRequest(requestOptions{
RequestName: internal.GetAppRequest,
URIParams: Params{"app_guid": guid},
})
if err != nil {
return Application{}, nil, err
}
var app Application
response := cloudcontr... | go | func (client *Client) GetApplication(guid string) (Application, Warnings, error) {
request, err := client.newHTTPRequest(requestOptions{
RequestName: internal.GetAppRequest,
URIParams: Params{"app_guid": guid},
})
if err != nil {
return Application{}, nil, err
}
var app Application
response := cloudcontr... | [
"func",
"(",
"client",
"*",
"Client",
")",
"GetApplication",
"(",
"guid",
"string",
")",
"(",
"Application",
",",
"Warnings",
",",
"error",
")",
"{",
"request",
",",
"err",
":=",
"client",
".",
"newHTTPRequest",
"(",
"requestOptions",
"{",
"RequestName",
"... | // GetApplication returns back an Application. | [
"GetApplication",
"returns",
"back",
"an",
"Application",
"."
] | 5010c000047f246b870475e2c299556078cdad30 | https://github.com/cloudfoundry/cli/blob/5010c000047f246b870475e2c299556078cdad30/api/cloudcontroller/ccv2/application.go#L251-L267 |
25,936 | cloudfoundry/cli | api/cloudcontroller/ccv2/application.go | GetRouteApplications | func (client *Client) GetRouteApplications(routeGUID string, filters ...Filter) ([]Application, Warnings, error) {
request, err := client.newHTTPRequest(requestOptions{
RequestName: internal.GetRouteAppsRequest,
URIParams: map[string]string{"route_guid": routeGUID},
Query: ConvertFilterParameters(filters... | go | func (client *Client) GetRouteApplications(routeGUID string, filters ...Filter) ([]Application, Warnings, error) {
request, err := client.newHTTPRequest(requestOptions{
RequestName: internal.GetRouteAppsRequest,
URIParams: map[string]string{"route_guid": routeGUID},
Query: ConvertFilterParameters(filters... | [
"func",
"(",
"client",
"*",
"Client",
")",
"GetRouteApplications",
"(",
"routeGUID",
"string",
",",
"filters",
"...",
"Filter",
")",
"(",
"[",
"]",
"Application",
",",
"Warnings",
",",
"error",
")",
"{",
"request",
",",
"err",
":=",
"client",
".",
"newHT... | // GetRouteApplications returns a list of Applications based off a route
// GUID and the provided filters. | [
"GetRouteApplications",
"returns",
"a",
"list",
"of",
"Applications",
"based",
"off",
"a",
"route",
"GUID",
"and",
"the",
"provided",
"filters",
"."
] | 5010c000047f246b870475e2c299556078cdad30 | https://github.com/cloudfoundry/cli/blob/5010c000047f246b870475e2c299556078cdad30/api/cloudcontroller/ccv2/application.go#L298-L322 |
25,937 | cloudfoundry/cli | api/cloudcontroller/ccv2/application.go | RestageApplication | func (client *Client) RestageApplication(app Application) (Application, Warnings, error) {
request, err := client.newHTTPRequest(requestOptions{
RequestName: internal.PostAppRestageRequest,
URIParams: Params{"app_guid": app.GUID},
})
if err != nil {
return Application{}, nil, err
}
var restagedApp Applica... | go | func (client *Client) RestageApplication(app Application) (Application, Warnings, error) {
request, err := client.newHTTPRequest(requestOptions{
RequestName: internal.PostAppRestageRequest,
URIParams: Params{"app_guid": app.GUID},
})
if err != nil {
return Application{}, nil, err
}
var restagedApp Applica... | [
"func",
"(",
"client",
"*",
"Client",
")",
"RestageApplication",
"(",
"app",
"Application",
")",
"(",
"Application",
",",
"Warnings",
",",
"error",
")",
"{",
"request",
",",
"err",
":=",
"client",
".",
"newHTTPRequest",
"(",
"requestOptions",
"{",
"RequestNa... | // RestageApplication restages the application with the given GUID. | [
"RestageApplication",
"restages",
"the",
"application",
"with",
"the",
"given",
"GUID",
"."
] | 5010c000047f246b870475e2c299556078cdad30 | https://github.com/cloudfoundry/cli/blob/5010c000047f246b870475e2c299556078cdad30/api/cloudcontroller/ccv2/application.go#L325-L341 |
25,938 | cloudfoundry/cli | actor/pushaction/application.go | CalculatedBuildpacks | func (app Application) CalculatedBuildpacks() []string {
buildpack := app.CalculatedBuildpack()
switch {
case app.Buildpacks != nil:
return app.Buildpacks
case len(buildpack) > 0:
return []string{buildpack}
default:
return nil
}
} | go | func (app Application) CalculatedBuildpacks() []string {
buildpack := app.CalculatedBuildpack()
switch {
case app.Buildpacks != nil:
return app.Buildpacks
case len(buildpack) > 0:
return []string{buildpack}
default:
return nil
}
} | [
"func",
"(",
"app",
"Application",
")",
"CalculatedBuildpacks",
"(",
")",
"[",
"]",
"string",
"{",
"buildpack",
":=",
"app",
".",
"CalculatedBuildpack",
"(",
")",
"\n",
"switch",
"{",
"case",
"app",
".",
"Buildpacks",
"!=",
"nil",
":",
"return",
"app",
"... | // CalculatedBuildpacks will return back the buildpacks for the application. | [
"CalculatedBuildpacks",
"will",
"return",
"back",
"the",
"buildpacks",
"for",
"the",
"application",
"."
] | 5010c000047f246b870475e2c299556078cdad30 | https://github.com/cloudfoundry/cli/blob/5010c000047f246b870475e2c299556078cdad30/actor/pushaction/application.go#L22-L32 |
25,939 | cloudfoundry/cli | actor/pushaction/application.go | ignoreSameStackGUID | func (actor Actor) ignoreSameStackGUID(config ApplicationConfig, v2App v2action.Application) v2action.Application {
if config.CurrentApplication.StackGUID == config.DesiredApplication.StackGUID {
v2App.StackGUID = ""
}
return v2App
} | go | func (actor Actor) ignoreSameStackGUID(config ApplicationConfig, v2App v2action.Application) v2action.Application {
if config.CurrentApplication.StackGUID == config.DesiredApplication.StackGUID {
v2App.StackGUID = ""
}
return v2App
} | [
"func",
"(",
"actor",
"Actor",
")",
"ignoreSameStackGUID",
"(",
"config",
"ApplicationConfig",
",",
"v2App",
"v2action",
".",
"Application",
")",
"v2action",
".",
"Application",
"{",
"if",
"config",
".",
"CurrentApplication",
".",
"StackGUID",
"==",
"config",
".... | // Apps updates with both docker image and stack guids fail. So do not send
// StackGUID unless it is necessary. | [
"Apps",
"updates",
"with",
"both",
"docker",
"image",
"and",
"stack",
"guids",
"fail",
".",
"So",
"do",
"not",
"send",
"StackGUID",
"unless",
"it",
"is",
"necessary",
"."
] | 5010c000047f246b870475e2c299556078cdad30 | https://github.com/cloudfoundry/cli/blob/5010c000047f246b870475e2c299556078cdad30/actor/pushaction/application.go#L155-L161 |
25,940 | cloudfoundry/cli | api/plugin/client.go | NewClient | func NewClient(config Config) *Client {
userAgent := fmt.Sprintf("%s/%s (%s; %s %s)",
config.AppName,
config.AppVersion,
runtime.Version(),
runtime.GOARCH,
runtime.GOOS,
)
client := Client{
userAgent: userAgent,
connection: NewConnection(config.SkipSSLValidation, config.DialTimeout),
}
return &clie... | go | func NewClient(config Config) *Client {
userAgent := fmt.Sprintf("%s/%s (%s; %s %s)",
config.AppName,
config.AppVersion,
runtime.Version(),
runtime.GOARCH,
runtime.GOOS,
)
client := Client{
userAgent: userAgent,
connection: NewConnection(config.SkipSSLValidation, config.DialTimeout),
}
return &clie... | [
"func",
"NewClient",
"(",
"config",
"Config",
")",
"*",
"Client",
"{",
"userAgent",
":=",
"fmt",
".",
"Sprintf",
"(",
"\"",
"\"",
",",
"config",
".",
"AppName",
",",
"config",
".",
"AppVersion",
",",
"runtime",
".",
"Version",
"(",
")",
",",
"runtime",... | // NewClient returns a new plugin Client. | [
"NewClient",
"returns",
"a",
"new",
"plugin",
"Client",
"."
] | 5010c000047f246b870475e2c299556078cdad30 | https://github.com/cloudfoundry/cli/blob/5010c000047f246b870475e2c299556078cdad30/api/plugin/client.go#L39-L53 |
25,941 | cloudfoundry/cli | actor/v7pushaction/update_application_settings.go | UpdateApplicationSettings | func (actor Actor) UpdateApplicationSettings(pushPlans []PushPlan) ([]PushPlan, Warnings, error) {
appNames := actor.getAppNames(pushPlans)
applications, getWarnings, err := actor.V7Actor.GetApplicationsByNamesAndSpace(appNames, pushPlans[0].SpaceGUID)
warnings := Warnings(getWarnings)
if err != nil {
log.Errorln... | go | func (actor Actor) UpdateApplicationSettings(pushPlans []PushPlan) ([]PushPlan, Warnings, error) {
appNames := actor.getAppNames(pushPlans)
applications, getWarnings, err := actor.V7Actor.GetApplicationsByNamesAndSpace(appNames, pushPlans[0].SpaceGUID)
warnings := Warnings(getWarnings)
if err != nil {
log.Errorln... | [
"func",
"(",
"actor",
"Actor",
")",
"UpdateApplicationSettings",
"(",
"pushPlans",
"[",
"]",
"PushPlan",
")",
"(",
"[",
"]",
"PushPlan",
",",
"Warnings",
",",
"error",
")",
"{",
"appNames",
":=",
"actor",
".",
"getAppNames",
"(",
"pushPlans",
")",
"\n",
... | // UpdateApplicationSettings syncs the Application state and GUID with the API. | [
"UpdateApplicationSettings",
"syncs",
"the",
"Application",
"state",
"and",
"GUID",
"with",
"the",
"API",
"."
] | 5010c000047f246b870475e2c299556078cdad30 | https://github.com/cloudfoundry/cli/blob/5010c000047f246b870475e2c299556078cdad30/actor/v7pushaction/update_application_settings.go#L10-L31 |
25,942 | cloudfoundry/cli | cf/api/logs/noaa_message_queue.go | Less | func (pq *NoaaMessageQueue) Less(i, j int) bool {
return *pq.messages[i].Timestamp < *pq.messages[j].Timestamp
} | go | func (pq *NoaaMessageQueue) Less(i, j int) bool {
return *pq.messages[i].Timestamp < *pq.messages[j].Timestamp
} | [
"func",
"(",
"pq",
"*",
"NoaaMessageQueue",
")",
"Less",
"(",
"i",
",",
"j",
"int",
")",
"bool",
"{",
"return",
"*",
"pq",
".",
"messages",
"[",
"i",
"]",
".",
"Timestamp",
"<",
"*",
"pq",
".",
"messages",
"[",
"j",
"]",
".",
"Timestamp",
"\n",
... | // implement sort interface so we can sort messages as we receive them in PushMessage | [
"implement",
"sort",
"interface",
"so",
"we",
"can",
"sort",
"messages",
"as",
"we",
"receive",
"them",
"in",
"PushMessage"
] | 5010c000047f246b870475e2c299556078cdad30 | https://github.com/cloudfoundry/cli/blob/5010c000047f246b870475e2c299556078cdad30/cf/api/logs/noaa_message_queue.go#L27-L29 |
25,943 | cloudfoundry/cli | actor/v7pushaction/create_push_plans.go | CreatePushPlans | func (actor Actor) CreatePushPlans(appNameArg string, spaceGUID string, orgGUID string, parser ManifestParser, overrides FlagOverrides) ([]PushPlan, error) {
var pushPlans []PushPlan
eligibleApps, err := actor.getEligibleApplications(parser, appNameArg)
if err != nil {
return nil, err
}
for _, manifestApplicat... | go | func (actor Actor) CreatePushPlans(appNameArg string, spaceGUID string, orgGUID string, parser ManifestParser, overrides FlagOverrides) ([]PushPlan, error) {
var pushPlans []PushPlan
eligibleApps, err := actor.getEligibleApplications(parser, appNameArg)
if err != nil {
return nil, err
}
for _, manifestApplicat... | [
"func",
"(",
"actor",
"Actor",
")",
"CreatePushPlans",
"(",
"appNameArg",
"string",
",",
"spaceGUID",
"string",
",",
"orgGUID",
"string",
",",
"parser",
"ManifestParser",
",",
"overrides",
"FlagOverrides",
")",
"(",
"[",
"]",
"PushPlan",
",",
"error",
")",
"... | // CreatePushPlans returns a set of PushPlan objects based off the inputs
// provided. It's assumed that all flag and argument and manifest combinations
// have been validated prior to calling this function. | [
"CreatePushPlans",
"returns",
"a",
"set",
"of",
"PushPlan",
"objects",
"based",
"off",
"the",
"inputs",
"provided",
".",
"It",
"s",
"assumed",
"that",
"all",
"flag",
"and",
"argument",
"and",
"manifest",
"combinations",
"have",
"been",
"validated",
"prior",
"t... | 5010c000047f246b870475e2c299556078cdad30 | https://github.com/cloudfoundry/cli/blob/5010c000047f246b870475e2c299556078cdad30/actor/v7pushaction/create_push_plans.go#L10-L37 |
25,944 | cloudfoundry/cli | api/cloudcontroller/ccv3/buildpack.go | DeleteBuildpack | func (client Client) DeleteBuildpack(buildpackGUID string) (JobURL, Warnings, error) {
request, err := client.newHTTPRequest(requestOptions{
RequestName: internal.DeleteBuildpackRequest,
URIParams: map[string]string{
"buildpack_guid": buildpackGUID,
},
})
if err != nil {
return "", nil, err
}
response ... | go | func (client Client) DeleteBuildpack(buildpackGUID string) (JobURL, Warnings, error) {
request, err := client.newHTTPRequest(requestOptions{
RequestName: internal.DeleteBuildpackRequest,
URIParams: map[string]string{
"buildpack_guid": buildpackGUID,
},
})
if err != nil {
return "", nil, err
}
response ... | [
"func",
"(",
"client",
"Client",
")",
"DeleteBuildpack",
"(",
"buildpackGUID",
"string",
")",
"(",
"JobURL",
",",
"Warnings",
",",
"error",
")",
"{",
"request",
",",
"err",
":=",
"client",
".",
"newHTTPRequest",
"(",
"requestOptions",
"{",
"RequestName",
":"... | // DeleteBuildpack deletes the buildpack with the provided guid. | [
"DeleteBuildpack",
"deletes",
"the",
"buildpack",
"with",
"the",
"provided",
"guid",
"."
] | 5010c000047f246b870475e2c299556078cdad30 | https://github.com/cloudfoundry/cli/blob/5010c000047f246b870475e2c299556078cdad30/api/cloudcontroller/ccv3/buildpack.go#L122-L137 |
25,945 | cloudfoundry/cli | actor/v7pushaction/resource_match.go | MatchResources | func (actor Actor) MatchResources(resources []sharedaction.V3Resource) ([]sharedaction.V3Resource, []sharedaction.V3Resource, Warnings, error) {
matches, warnings, err := actor.V7Actor.ResourceMatch(resources)
mapChecksumToResource := map[string]sharedaction.V3Resource{}
for _, resource := range matches {
mapChec... | go | func (actor Actor) MatchResources(resources []sharedaction.V3Resource) ([]sharedaction.V3Resource, []sharedaction.V3Resource, Warnings, error) {
matches, warnings, err := actor.V7Actor.ResourceMatch(resources)
mapChecksumToResource := map[string]sharedaction.V3Resource{}
for _, resource := range matches {
mapChec... | [
"func",
"(",
"actor",
"Actor",
")",
"MatchResources",
"(",
"resources",
"[",
"]",
"sharedaction",
".",
"V3Resource",
")",
"(",
"[",
"]",
"sharedaction",
".",
"V3Resource",
",",
"[",
"]",
"sharedaction",
".",
"V3Resource",
",",
"Warnings",
",",
"error",
")"... | // MatchResources returns back a list of matched and unmatched resources for the provided resources. | [
"MatchResources",
"returns",
"back",
"a",
"list",
"of",
"matched",
"and",
"unmatched",
"resources",
"for",
"the",
"provided",
"resources",
"."
] | 5010c000047f246b870475e2c299556078cdad30 | https://github.com/cloudfoundry/cli/blob/5010c000047f246b870475e2c299556078cdad30/actor/v7pushaction/resource_match.go#L6-L22 |
25,946 | cloudfoundry/cli | api/cloudcontroller/ccv2/user.go | UnmarshalJSON | func (user *User) UnmarshalJSON(data []byte) error {
var ccUser struct {
Metadata internal.Metadata `json:"metadata"`
}
err := cloudcontroller.DecodeJSON(data, &ccUser)
if err != nil {
return err
}
user.GUID = ccUser.Metadata.GUID
return nil
} | go | func (user *User) UnmarshalJSON(data []byte) error {
var ccUser struct {
Metadata internal.Metadata `json:"metadata"`
}
err := cloudcontroller.DecodeJSON(data, &ccUser)
if err != nil {
return err
}
user.GUID = ccUser.Metadata.GUID
return nil
} | [
"func",
"(",
"user",
"*",
"User",
")",
"UnmarshalJSON",
"(",
"data",
"[",
"]",
"byte",
")",
"error",
"{",
"var",
"ccUser",
"struct",
"{",
"Metadata",
"internal",
".",
"Metadata",
"`json:\"metadata\"`",
"\n",
"}",
"\n",
"err",
":=",
"cloudcontroller",
".",
... | // UnmarshalJSON helps unmarshal a Cloud Controller User response. | [
"UnmarshalJSON",
"helps",
"unmarshal",
"a",
"Cloud",
"Controller",
"User",
"response",
"."
] | 5010c000047f246b870475e2c299556078cdad30 | https://github.com/cloudfoundry/cli/blob/5010c000047f246b870475e2c299556078cdad30/api/cloudcontroller/ccv2/user.go#L18-L29 |
25,947 | cloudfoundry/cli | api/cloudcontroller/ccv2/user.go | CreateUser | func (client *Client) CreateUser(uaaUserID string) (User, Warnings, error) {
type userRequestBody struct {
GUID string `json:"guid"`
}
bodyBytes, err := json.Marshal(userRequestBody{
GUID: uaaUserID,
})
if err != nil {
return User{}, nil, err
}
request, err := client.newHTTPRequest(requestOptions{
Requ... | go | func (client *Client) CreateUser(uaaUserID string) (User, Warnings, error) {
type userRequestBody struct {
GUID string `json:"guid"`
}
bodyBytes, err := json.Marshal(userRequestBody{
GUID: uaaUserID,
})
if err != nil {
return User{}, nil, err
}
request, err := client.newHTTPRequest(requestOptions{
Requ... | [
"func",
"(",
"client",
"*",
"Client",
")",
"CreateUser",
"(",
"uaaUserID",
"string",
")",
"(",
"User",
",",
"Warnings",
",",
"error",
")",
"{",
"type",
"userRequestBody",
"struct",
"{",
"GUID",
"string",
"`json:\"guid\"`",
"\n",
"}",
"\n\n",
"bodyBytes",
"... | // CreateUser creates a new Cloud Controller User from the provided UAA user
// ID. | [
"CreateUser",
"creates",
"a",
"new",
"Cloud",
"Controller",
"User",
"from",
"the",
"provided",
"UAA",
"user",
"ID",
"."
] | 5010c000047f246b870475e2c299556078cdad30 | https://github.com/cloudfoundry/cli/blob/5010c000047f246b870475e2c299556078cdad30/api/cloudcontroller/ccv2/user.go#L33-L64 |
25,948 | cloudfoundry/cli | api/router/client.go | NewClient | func NewClient(config Config) *Client {
userAgent := fmt.Sprintf("%s/%s (%s; %s %s)",
config.AppName,
config.AppVersion,
runtime.Version(),
runtime.GOARCH,
runtime.GOOS,
)
client := Client{
userAgent: userAgent,
router: rata.NewRequestGenerator(config.RoutingEndpoint, internal.APIRoutes),
conne... | go | func NewClient(config Config) *Client {
userAgent := fmt.Sprintf("%s/%s (%s; %s %s)",
config.AppName,
config.AppVersion,
runtime.Version(),
runtime.GOARCH,
runtime.GOOS,
)
client := Client{
userAgent: userAgent,
router: rata.NewRequestGenerator(config.RoutingEndpoint, internal.APIRoutes),
conne... | [
"func",
"NewClient",
"(",
"config",
"Config",
")",
"*",
"Client",
"{",
"userAgent",
":=",
"fmt",
".",
"Sprintf",
"(",
"\"",
"\"",
",",
"config",
".",
"AppName",
",",
"config",
".",
"AppVersion",
",",
"runtime",
".",
"Version",
"(",
")",
",",
"runtime",... | // NewClient returns a new Router Client. | [
"NewClient",
"returns",
"a",
"new",
"Router",
"Client",
"."
] | 5010c000047f246b870475e2c299556078cdad30 | https://github.com/cloudfoundry/cli/blob/5010c000047f246b870475e2c299556078cdad30/api/router/client.go#L42-L62 |
25,949 | cloudfoundry/cli | api/cloudcontroller/ccv2/service_instance_shared_from.go | GetServiceInstanceSharedFrom | func (client *Client) GetServiceInstanceSharedFrom(serviceInstanceGUID string) (ServiceInstanceSharedFrom, Warnings, error) {
request, err := client.newHTTPRequest(requestOptions{
RequestName: internal.GetServiceInstanceSharedFromRequest,
URIParams: Params{"service_instance_guid": serviceInstanceGUID},
})
if e... | go | func (client *Client) GetServiceInstanceSharedFrom(serviceInstanceGUID string) (ServiceInstanceSharedFrom, Warnings, error) {
request, err := client.newHTTPRequest(requestOptions{
RequestName: internal.GetServiceInstanceSharedFromRequest,
URIParams: Params{"service_instance_guid": serviceInstanceGUID},
})
if e... | [
"func",
"(",
"client",
"*",
"Client",
")",
"GetServiceInstanceSharedFrom",
"(",
"serviceInstanceGUID",
"string",
")",
"(",
"ServiceInstanceSharedFrom",
",",
"Warnings",
",",
"error",
")",
"{",
"request",
",",
"err",
":=",
"client",
".",
"newHTTPRequest",
"(",
"r... | // GetServiceInstanceSharedFrom returns back a ServiceInstanceSharedFrom
// object. | [
"GetServiceInstanceSharedFrom",
"returns",
"back",
"a",
"ServiceInstanceSharedFrom",
"object",
"."
] | 5010c000047f246b870475e2c299556078cdad30 | https://github.com/cloudfoundry/cli/blob/5010c000047f246b870475e2c299556078cdad30/api/cloudcontroller/ccv2/service_instance_shared_from.go#L26-L42 |
25,950 | cloudfoundry/cli | api/cloudcontroller/ccv3/feature_flag.go | GetFeatureFlags | func (client *Client) GetFeatureFlags() ([]FeatureFlag, Warnings, error) {
request, err := client.newHTTPRequest(requestOptions{
RequestName: internal.GetFeatureFlagsRequest,
})
if err != nil {
return nil, nil, err
}
var fullFeatureFlagList []FeatureFlag
warnings, err := client.paginate(request, FeatureFlag... | go | func (client *Client) GetFeatureFlags() ([]FeatureFlag, Warnings, error) {
request, err := client.newHTTPRequest(requestOptions{
RequestName: internal.GetFeatureFlagsRequest,
})
if err != nil {
return nil, nil, err
}
var fullFeatureFlagList []FeatureFlag
warnings, err := client.paginate(request, FeatureFlag... | [
"func",
"(",
"client",
"*",
"Client",
")",
"GetFeatureFlags",
"(",
")",
"(",
"[",
"]",
"FeatureFlag",
",",
"Warnings",
",",
"error",
")",
"{",
"request",
",",
"err",
":=",
"client",
".",
"newHTTPRequest",
"(",
"requestOptions",
"{",
"RequestName",
":",
"... | // GetFeatureFlags lists feature flags. | [
"GetFeatureFlags",
"lists",
"feature",
"flags",
"."
] | 5010c000047f246b870475e2c299556078cdad30 | https://github.com/cloudfoundry/cli/blob/5010c000047f246b870475e2c299556078cdad30/api/cloudcontroller/ccv3/feature_flag.go#L51-L75 |
25,951 | cloudfoundry/cli | command/v7/ssh_command.go | EvaluateTTYOption | func (cmd SSHCommand) EvaluateTTYOption() (sharedaction.TTYOption, error) {
var count int
option := sharedaction.RequestTTYAuto
if cmd.DisablePseudoTTY {
option = sharedaction.RequestTTYNo
count++
}
if cmd.ForcePseudoTTY {
option = sharedaction.RequestTTYForce
count++
}
if cmd.RequestPseudoTTY {
optio... | go | func (cmd SSHCommand) EvaluateTTYOption() (sharedaction.TTYOption, error) {
var count int
option := sharedaction.RequestTTYAuto
if cmd.DisablePseudoTTY {
option = sharedaction.RequestTTYNo
count++
}
if cmd.ForcePseudoTTY {
option = sharedaction.RequestTTYForce
count++
}
if cmd.RequestPseudoTTY {
optio... | [
"func",
"(",
"cmd",
"SSHCommand",
")",
"EvaluateTTYOption",
"(",
")",
"(",
"sharedaction",
".",
"TTYOption",
",",
"error",
")",
"{",
"var",
"count",
"int",
"\n\n",
"option",
":=",
"sharedaction",
".",
"RequestTTYAuto",
"\n",
"if",
"cmd",
".",
"DisablePseudoT... | // EvaluateTTYOption determines which TTY options are mutually exclusive and
// returns an error accordingly. | [
"EvaluateTTYOption",
"determines",
"which",
"TTY",
"options",
"are",
"mutually",
"exclusive",
"and",
"returns",
"an",
"error",
"accordingly",
"."
] | 5010c000047f246b870475e2c299556078cdad30 | https://github.com/cloudfoundry/cli/blob/5010c000047f246b870475e2c299556078cdad30/command/v7/ssh_command.go#L118-L142 |
25,952 | cloudfoundry/cli | actor/v2action/space_quota.go | GetSpaceQuotaByName | func (actor Actor) GetSpaceQuotaByName(quotaName, orgGUID string) (SpaceQuota, Warnings, error) {
quotas, warnings, err := actor.CloudControllerClient.GetSpaceQuotas(orgGUID)
if err != nil {
return SpaceQuota{}, Warnings(warnings), err
}
for _, quota := range quotas {
if quota.Name == quotaName {
return Sp... | go | func (actor Actor) GetSpaceQuotaByName(quotaName, orgGUID string) (SpaceQuota, Warnings, error) {
quotas, warnings, err := actor.CloudControllerClient.GetSpaceQuotas(orgGUID)
if err != nil {
return SpaceQuota{}, Warnings(warnings), err
}
for _, quota := range quotas {
if quota.Name == quotaName {
return Sp... | [
"func",
"(",
"actor",
"Actor",
")",
"GetSpaceQuotaByName",
"(",
"quotaName",
",",
"orgGUID",
"string",
")",
"(",
"SpaceQuota",
",",
"Warnings",
",",
"error",
")",
"{",
"quotas",
",",
"warnings",
",",
"err",
":=",
"actor",
".",
"CloudControllerClient",
".",
... | // GetSpaceQuotaByName finds the quota by name and returns an error if not found | [
"GetSpaceQuotaByName",
"finds",
"the",
"quota",
"by",
"name",
"and",
"returns",
"an",
"error",
"if",
"not",
"found"
] | 5010c000047f246b870475e2c299556078cdad30 | https://github.com/cloudfoundry/cli/blob/5010c000047f246b870475e2c299556078cdad30/actor/v2action/space_quota.go#L22-L36 |
25,953 | cloudfoundry/cli | actor/v2action/space_quota.go | SetSpaceQuota | func (actor Actor) SetSpaceQuota(spaceGUID, quotaGUID string) (Warnings, error) {
warnings, err := actor.CloudControllerClient.SetSpaceQuota(spaceGUID, quotaGUID)
return Warnings(warnings), err
} | go | func (actor Actor) SetSpaceQuota(spaceGUID, quotaGUID string) (Warnings, error) {
warnings, err := actor.CloudControllerClient.SetSpaceQuota(spaceGUID, quotaGUID)
return Warnings(warnings), err
} | [
"func",
"(",
"actor",
"Actor",
")",
"SetSpaceQuota",
"(",
"spaceGUID",
",",
"quotaGUID",
"string",
")",
"(",
"Warnings",
",",
"error",
")",
"{",
"warnings",
",",
"err",
":=",
"actor",
".",
"CloudControllerClient",
".",
"SetSpaceQuota",
"(",
"spaceGUID",
",",... | // SetSpaceQuota sets the space quota for the corresponding space | [
"SetSpaceQuota",
"sets",
"the",
"space",
"quota",
"for",
"the",
"corresponding",
"space"
] | 5010c000047f246b870475e2c299556078cdad30 | https://github.com/cloudfoundry/cli/blob/5010c000047f246b870475e2c299556078cdad30/actor/v2action/space_quota.go#L39-L42 |
25,954 | cloudfoundry/cli | actor/v2action/domain.go | GetDomain | func (actor Actor) GetDomain(domainGUID string) (Domain, Warnings, error) {
var allWarnings Warnings
domain, warnings, err := actor.GetSharedDomain(domainGUID)
allWarnings = append(allWarnings, warnings...)
switch err.(type) {
case nil:
return domain, allWarnings, nil
case actionerror.DomainNotFoundError:
def... | go | func (actor Actor) GetDomain(domainGUID string) (Domain, Warnings, error) {
var allWarnings Warnings
domain, warnings, err := actor.GetSharedDomain(domainGUID)
allWarnings = append(allWarnings, warnings...)
switch err.(type) {
case nil:
return domain, allWarnings, nil
case actionerror.DomainNotFoundError:
def... | [
"func",
"(",
"actor",
"Actor",
")",
"GetDomain",
"(",
"domainGUID",
"string",
")",
"(",
"Domain",
",",
"Warnings",
",",
"error",
")",
"{",
"var",
"allWarnings",
"Warnings",
"\n\n",
"domain",
",",
"warnings",
",",
"err",
":=",
"actor",
".",
"GetSharedDomain... | // GetDomain returns the shared or private domain associated with the provided
// Domain GUID. | [
"GetDomain",
"returns",
"the",
"shared",
"or",
"private",
"domain",
"associated",
"with",
"the",
"provided",
"Domain",
"GUID",
"."
] | 5010c000047f246b870475e2c299556078cdad30 | https://github.com/cloudfoundry/cli/blob/5010c000047f246b870475e2c299556078cdad30/actor/v2action/domain.go#L45-L66 |
25,955 | cloudfoundry/cli | actor/v2action/domain.go | GetDomainsByNameAndOrganization | func (actor Actor) GetDomainsByNameAndOrganization(domainNames []string, orgGUID string) ([]Domain, Warnings, error) {
if len(domainNames) == 0 {
return nil, nil, nil
}
var domains []Domain
var allWarnings Warnings
// TODO: If the following causes URI length problems, break domainNames into
// batched (based ... | go | func (actor Actor) GetDomainsByNameAndOrganization(domainNames []string, orgGUID string) ([]Domain, Warnings, error) {
if len(domainNames) == 0 {
return nil, nil, nil
}
var domains []Domain
var allWarnings Warnings
// TODO: If the following causes URI length problems, break domainNames into
// batched (based ... | [
"func",
"(",
"actor",
"Actor",
")",
"GetDomainsByNameAndOrganization",
"(",
"domainNames",
"[",
"]",
"string",
",",
"orgGUID",
"string",
")",
"(",
"[",
"]",
"Domain",
",",
"Warnings",
",",
"error",
")",
"{",
"if",
"len",
"(",
"domainNames",
")",
"==",
"0... | // GetDomainsByNameAndOrganization returns back a list of domains given a list
// of domains names and the organization GUID. If no domains are given, than this
// command will not lookup any domains. | [
"GetDomainsByNameAndOrganization",
"returns",
"back",
"a",
"list",
"of",
"domains",
"given",
"a",
"list",
"of",
"domains",
"names",
"and",
"the",
"organization",
"GUID",
".",
"If",
"no",
"domains",
"are",
"given",
"than",
"this",
"command",
"will",
"not",
"loo... | 5010c000047f246b870475e2c299556078cdad30 | https://github.com/cloudfoundry/cli/blob/5010c000047f246b870475e2c299556078cdad30/actor/v2action/domain.go#L71-L115 |
25,956 | cloudfoundry/cli | actor/v2action/domain.go | GetSharedDomain | func (actor Actor) GetSharedDomain(domainGUID string) (Domain, Warnings, error) {
if domain, found := actor.loadDomain(domainGUID); found {
log.WithFields(log.Fields{
"domain": domain.Name,
"GUID": domain.GUID,
}).Debug("using domain from cache")
return domain, nil, nil
}
domain, warnings, err := acto... | go | func (actor Actor) GetSharedDomain(domainGUID string) (Domain, Warnings, error) {
if domain, found := actor.loadDomain(domainGUID); found {
log.WithFields(log.Fields{
"domain": domain.Name,
"GUID": domain.GUID,
}).Debug("using domain from cache")
return domain, nil, nil
}
domain, warnings, err := acto... | [
"func",
"(",
"actor",
"Actor",
")",
"GetSharedDomain",
"(",
"domainGUID",
"string",
")",
"(",
"Domain",
",",
"Warnings",
",",
"error",
")",
"{",
"if",
"domain",
",",
"found",
":=",
"actor",
".",
"loadDomain",
"(",
"domainGUID",
")",
";",
"found",
"{",
... | // GetSharedDomain returns the shared domain associated with the provided
// Domain GUID. | [
"GetSharedDomain",
"returns",
"the",
"shared",
"domain",
"associated",
"with",
"the",
"provided",
"Domain",
"GUID",
"."
] | 5010c000047f246b870475e2c299556078cdad30 | https://github.com/cloudfoundry/cli/blob/5010c000047f246b870475e2c299556078cdad30/actor/v2action/domain.go#L146-L162 |
25,957 | cloudfoundry/cli | actor/v2action/domain.go | GetOrganizationDomains | func (actor Actor) GetOrganizationDomains(orgGUID string) ([]Domain, Warnings, error) {
var (
allWarnings Warnings
allDomains []Domain
)
domains, warnings, err := actor.CloudControllerClient.GetSharedDomains()
allWarnings = append(allWarnings, warnings...)
if err != nil {
return []Domain{}, allWarnings, e... | go | func (actor Actor) GetOrganizationDomains(orgGUID string) ([]Domain, Warnings, error) {
var (
allWarnings Warnings
allDomains []Domain
)
domains, warnings, err := actor.CloudControllerClient.GetSharedDomains()
allWarnings = append(allWarnings, warnings...)
if err != nil {
return []Domain{}, allWarnings, e... | [
"func",
"(",
"actor",
"Actor",
")",
"GetOrganizationDomains",
"(",
"orgGUID",
"string",
")",
"(",
"[",
"]",
"Domain",
",",
"Warnings",
",",
"error",
")",
"{",
"var",
"(",
"allWarnings",
"Warnings",
"\n",
"allDomains",
"[",
"]",
"Domain",
"\n",
")",
"\n\n... | // GetOrganizationDomains returns the shared and private domains associated
// with an organization. | [
"GetOrganizationDomains",
"returns",
"the",
"shared",
"and",
"private",
"domains",
"associated",
"with",
"an",
"organization",
"."
] | 5010c000047f246b870475e2c299556078cdad30 | https://github.com/cloudfoundry/cli/blob/5010c000047f246b870475e2c299556078cdad30/actor/v2action/domain.go#L186-L213 |
25,958 | cloudfoundry/cli | actor/v7action/process_instance.go | StartTime | func (instance *ProcessInstance) StartTime() time.Time {
return time.Now().Add(-instance.Uptime)
} | go | func (instance *ProcessInstance) StartTime() time.Time {
return time.Now().Add(-instance.Uptime)
} | [
"func",
"(",
"instance",
"*",
"ProcessInstance",
")",
"StartTime",
"(",
")",
"time",
".",
"Time",
"{",
"return",
"time",
".",
"Now",
"(",
")",
".",
"Add",
"(",
"-",
"instance",
".",
"Uptime",
")",
"\n",
"}"
] | // StartTime returns the time that the instance started. | [
"StartTime",
"returns",
"the",
"time",
"that",
"the",
"instance",
"started",
"."
] | 5010c000047f246b870475e2c299556078cdad30 | https://github.com/cloudfoundry/cli/blob/5010c000047f246b870475e2c299556078cdad30/actor/v7action/process_instance.go#L21-L23 |
25,959 | cloudfoundry/cli | command/plugin/shared/new_client.go | NewClient | func NewClient(config command.Config, ui command.UI, skipSSLValidation bool) *plugin.Client {
verbose, location := config.Verbose()
pluginClient := plugin.NewClient(plugin.Config{
AppName: config.BinaryName(),
AppVersion: config.BinaryVersion(),
DialTimeout: config.DialTimeout(),
Skip... | go | func NewClient(config command.Config, ui command.UI, skipSSLValidation bool) *plugin.Client {
verbose, location := config.Verbose()
pluginClient := plugin.NewClient(plugin.Config{
AppName: config.BinaryName(),
AppVersion: config.BinaryVersion(),
DialTimeout: config.DialTimeout(),
Skip... | [
"func",
"NewClient",
"(",
"config",
"command",
".",
"Config",
",",
"ui",
"command",
".",
"UI",
",",
"skipSSLValidation",
"bool",
")",
"*",
"plugin",
".",
"Client",
"{",
"verbose",
",",
"location",
":=",
"config",
".",
"Verbose",
"(",
")",
"\n\n",
"plugin... | // NewClient creates a new V2 Cloud Controller client and UAA client using the
// passed in config. | [
"NewClient",
"creates",
"a",
"new",
"V2",
"Cloud",
"Controller",
"client",
"and",
"UAA",
"client",
"using",
"the",
"passed",
"in",
"config",
"."
] | 5010c000047f246b870475e2c299556078cdad30 | https://github.com/cloudfoundry/cli/blob/5010c000047f246b870475e2c299556078cdad30/command/plugin/shared/new_client.go#L11-L32 |
25,960 | cloudfoundry/cli | api/uaa/resources.go | SetupResources | func (client *Client) SetupResources(bootstrapURL string) error {
request, err := client.newRequest(requestOptions{
Method: http.MethodGet,
URL: fmt.Sprintf("%s/login", bootstrapURL),
})
if err != nil {
return err
}
info := NewInfo(bootstrapURL)
response := Response{
Result: &info,
}
err = client.... | go | func (client *Client) SetupResources(bootstrapURL string) error {
request, err := client.newRequest(requestOptions{
Method: http.MethodGet,
URL: fmt.Sprintf("%s/login", bootstrapURL),
})
if err != nil {
return err
}
info := NewInfo(bootstrapURL)
response := Response{
Result: &info,
}
err = client.... | [
"func",
"(",
"client",
"*",
"Client",
")",
"SetupResources",
"(",
"bootstrapURL",
"string",
")",
"error",
"{",
"request",
",",
"err",
":=",
"client",
".",
"newRequest",
"(",
"requestOptions",
"{",
"Method",
":",
"http",
".",
"MethodGet",
",",
"URL",
":",
... | // SetupResources configures the client to use the specified settings and diescopers the UAA and Authentication resources | [
"SetupResources",
"configures",
"the",
"client",
"to",
"use",
"the",
"specified",
"settings",
"and",
"diescopers",
"the",
"UAA",
"and",
"Authentication",
"resources"
] | 5010c000047f246b870475e2c299556078cdad30 | https://github.com/cloudfoundry/cli/blob/5010c000047f246b870475e2c299556078cdad30/api/uaa/resources.go#L11-L42 |
25,961 | cloudfoundry/cli | actor/sharedaction/help.go | CommandInfoByName | func (Actor) CommandInfoByName(commandList interface{}, commandName string) (CommandInfo, error) {
field, found := reflect.TypeOf(commandList).FieldByNameFunc(
func(fieldName string) bool {
field, _ := reflect.TypeOf(commandList).FieldByName(fieldName)
return field.Tag.Get("command") == commandName || field.Ta... | go | func (Actor) CommandInfoByName(commandList interface{}, commandName string) (CommandInfo, error) {
field, found := reflect.TypeOf(commandList).FieldByNameFunc(
func(fieldName string) bool {
field, _ := reflect.TypeOf(commandList).FieldByName(fieldName)
return field.Tag.Get("command") == commandName || field.Ta... | [
"func",
"(",
"Actor",
")",
"CommandInfoByName",
"(",
"commandList",
"interface",
"{",
"}",
",",
"commandName",
"string",
")",
"(",
"CommandInfo",
",",
"error",
")",
"{",
"field",
",",
"found",
":=",
"reflect",
".",
"TypeOf",
"(",
"commandList",
")",
".",
... | // CommandInfoByName returns the help information for a particular commandName in
// the commandList. | [
"CommandInfoByName",
"returns",
"the",
"help",
"information",
"for",
"a",
"particular",
"commandName",
"in",
"the",
"commandList",
"."
] | 5010c000047f246b870475e2c299556078cdad30 | https://github.com/cloudfoundry/cli/blob/5010c000047f246b870475e2c299556078cdad30/actor/sharedaction/help.go#L60-L120 |
25,962 | cloudfoundry/cli | actor/sharedaction/help.go | CommandInfos | func (Actor) CommandInfos(commandList interface{}) map[string]CommandInfo {
handler := reflect.TypeOf(commandList)
infos := make(map[string]CommandInfo, handler.NumField())
for i := 0; i < handler.NumField(); i++ {
fieldTag := handler.Field(i).Tag
commandName := fieldTag.Get("command")
infos[commandName] = Co... | go | func (Actor) CommandInfos(commandList interface{}) map[string]CommandInfo {
handler := reflect.TypeOf(commandList)
infos := make(map[string]CommandInfo, handler.NumField())
for i := 0; i < handler.NumField(); i++ {
fieldTag := handler.Field(i).Tag
commandName := fieldTag.Get("command")
infos[commandName] = Co... | [
"func",
"(",
"Actor",
")",
"CommandInfos",
"(",
"commandList",
"interface",
"{",
"}",
")",
"map",
"[",
"string",
"]",
"CommandInfo",
"{",
"handler",
":=",
"reflect",
".",
"TypeOf",
"(",
"commandList",
")",
"\n\n",
"infos",
":=",
"make",
"(",
"map",
"[",
... | // CommandInfos returns a slice of CommandInfo that only fills in
// the Name and Description for all the commands in commandList | [
"CommandInfos",
"returns",
"a",
"slice",
"of",
"CommandInfo",
"that",
"only",
"fills",
"in",
"the",
"Name",
"and",
"Description",
"for",
"all",
"the",
"commands",
"in",
"commandList"
] | 5010c000047f246b870475e2c299556078cdad30 | https://github.com/cloudfoundry/cli/blob/5010c000047f246b870475e2c299556078cdad30/actor/sharedaction/help.go#L124-L139 |
25,963 | cloudfoundry/cli | api/cloudcontroller/ccv3/resource.go | UnmarshalJSON | func (r *Resource) UnmarshalJSON(data []byte) error {
var ccResource struct {
FilePath string `json:"path,omitempty"`
Mode string `json:"mode,omitempty"`
Checksum Checksum `json:"checksum"`
SizeInBytes int64 `json:"size_in_bytes"`
}
err := cloudcontroller.DecodeJSON(data, &ccResource)
i... | go | func (r *Resource) UnmarshalJSON(data []byte) error {
var ccResource struct {
FilePath string `json:"path,omitempty"`
Mode string `json:"mode,omitempty"`
Checksum Checksum `json:"checksum"`
SizeInBytes int64 `json:"size_in_bytes"`
}
err := cloudcontroller.DecodeJSON(data, &ccResource)
i... | [
"func",
"(",
"r",
"*",
"Resource",
")",
"UnmarshalJSON",
"(",
"data",
"[",
"]",
"byte",
")",
"error",
"{",
"var",
"ccResource",
"struct",
"{",
"FilePath",
"string",
"`json:\"path,omitempty\"`",
"\n",
"Mode",
"string",
"`json:\"mode,omitempty\"`",
"\n",
"Checksum... | // UnmarshalJSON helps unmarshal a Cloud Controller Resource response. | [
"UnmarshalJSON",
"helps",
"unmarshal",
"a",
"Cloud",
"Controller",
"Resource",
"response",
"."
] | 5010c000047f246b870475e2c299556078cdad30 | https://github.com/cloudfoundry/cli/blob/5010c000047f246b870475e2c299556078cdad30/api/cloudcontroller/ccv3/resource.go#L58-L81 |
25,964 | cloudfoundry/cli | api/cloudcontroller/ccv3/job_url.go | DeleteApplication | func (client *Client) DeleteApplication(appGUID string) (JobURL, Warnings, error) {
request, err := client.newHTTPRequest(requestOptions{
RequestName: internal.DeleteApplicationRequest,
URIParams: internal.Params{"app_guid": appGUID},
})
if err != nil {
return "", nil, err
}
response := cloudcontroller.Re... | go | func (client *Client) DeleteApplication(appGUID string) (JobURL, Warnings, error) {
request, err := client.newHTTPRequest(requestOptions{
RequestName: internal.DeleteApplicationRequest,
URIParams: internal.Params{"app_guid": appGUID},
})
if err != nil {
return "", nil, err
}
response := cloudcontroller.Re... | [
"func",
"(",
"client",
"*",
"Client",
")",
"DeleteApplication",
"(",
"appGUID",
"string",
")",
"(",
"JobURL",
",",
"Warnings",
",",
"error",
")",
"{",
"request",
",",
"err",
":=",
"client",
".",
"newHTTPRequest",
"(",
"requestOptions",
"{",
"RequestName",
... | // DeleteApplication deletes the app with the given app GUID. Returns back a
// resulting job URL to poll. | [
"DeleteApplication",
"deletes",
"the",
"app",
"with",
"the",
"given",
"app",
"GUID",
".",
"Returns",
"back",
"a",
"resulting",
"job",
"URL",
"to",
"poll",
"."
] | 5010c000047f246b870475e2c299556078cdad30 | https://github.com/cloudfoundry/cli/blob/5010c000047f246b870475e2c299556078cdad30/api/cloudcontroller/ccv3/job_url.go#L14-L27 |
25,965 | cloudfoundry/cli | api/cloudcontroller/ccv3/job_url.go | UpdateApplicationApplyManifest | func (client *Client) UpdateApplicationApplyManifest(appGUID string, rawManifest []byte) (JobURL, Warnings, error) {
request, err := client.newHTTPRequest(requestOptions{
RequestName: internal.PostApplicationActionApplyManifest,
URIParams: map[string]string{"app_guid": appGUID},
Body: bytes.NewReader(ra... | go | func (client *Client) UpdateApplicationApplyManifest(appGUID string, rawManifest []byte) (JobURL, Warnings, error) {
request, err := client.newHTTPRequest(requestOptions{
RequestName: internal.PostApplicationActionApplyManifest,
URIParams: map[string]string{"app_guid": appGUID},
Body: bytes.NewReader(ra... | [
"func",
"(",
"client",
"*",
"Client",
")",
"UpdateApplicationApplyManifest",
"(",
"appGUID",
"string",
",",
"rawManifest",
"[",
"]",
"byte",
")",
"(",
"JobURL",
",",
"Warnings",
",",
"error",
")",
"{",
"request",
",",
"err",
":=",
"client",
".",
"newHTTPRe... | // UpdateApplicationApplyManifest applies the manifest to the given
// application. Returns back a resulting job URL to poll. | [
"UpdateApplicationApplyManifest",
"applies",
"the",
"manifest",
"to",
"the",
"given",
"application",
".",
"Returns",
"back",
"a",
"resulting",
"job",
"URL",
"to",
"poll",
"."
] | 5010c000047f246b870475e2c299556078cdad30 | https://github.com/cloudfoundry/cli/blob/5010c000047f246b870475e2c299556078cdad30/api/cloudcontroller/ccv3/job_url.go#L31-L48 |
25,966 | cloudfoundry/cli | util/ui/i18n.go | GetTranslationFunc | func GetTranslationFunc(reader LocaleReader) (TranslateFunc, error) {
locale, err := determineLocale(reader)
if err != nil {
locale = defaultLocale
}
rawTranslation, err := loadAssetFromResources(locale)
if err != nil {
rawTranslation, err = loadAssetFromResources(defaultLocale)
if err != nil {
return ni... | go | func GetTranslationFunc(reader LocaleReader) (TranslateFunc, error) {
locale, err := determineLocale(reader)
if err != nil {
locale = defaultLocale
}
rawTranslation, err := loadAssetFromResources(locale)
if err != nil {
rawTranslation, err = loadAssetFromResources(defaultLocale)
if err != nil {
return ni... | [
"func",
"GetTranslationFunc",
"(",
"reader",
"LocaleReader",
")",
"(",
"TranslateFunc",
",",
"error",
")",
"{",
"locale",
",",
"err",
":=",
"determineLocale",
"(",
"reader",
")",
"\n",
"if",
"err",
"!=",
"nil",
"{",
"locale",
"=",
"defaultLocale",
"\n",
"}... | // GetTranslationFunc will return back a function that can be used to translate
// strings into the currently set locale. | [
"GetTranslationFunc",
"will",
"return",
"back",
"a",
"function",
"that",
"can",
"be",
"used",
"to",
"translate",
"strings",
"into",
"the",
"currently",
"set",
"locale",
"."
] | 5010c000047f246b870475e2c299556078cdad30 | https://github.com/cloudfoundry/cli/blob/5010c000047f246b870475e2c299556078cdad30/util/ui/i18n.go#L48-L63 |
25,967 | cloudfoundry/cli | integration/helpers/user.go | GetUsers | func GetUsers() []User {
var userPagesResponse struct {
NextURL *string `json:"next_url"`
Resources []struct {
Metadata struct {
GUID string `json:"guid"`
CreatedAt time.Time `json:"created_at"`
} `json:"metadata"`
Entity struct {
Username string `json:"username"`
} `json:"entity"... | go | func GetUsers() []User {
var userPagesResponse struct {
NextURL *string `json:"next_url"`
Resources []struct {
Metadata struct {
GUID string `json:"guid"`
CreatedAt time.Time `json:"created_at"`
} `json:"metadata"`
Entity struct {
Username string `json:"username"`
} `json:"entity"... | [
"func",
"GetUsers",
"(",
")",
"[",
"]",
"User",
"{",
"var",
"userPagesResponse",
"struct",
"{",
"NextURL",
"*",
"string",
"`json:\"next_url\"`",
"\n",
"Resources",
"[",
"]",
"struct",
"{",
"Metadata",
"struct",
"{",
"GUID",
"string",
"`json:\"guid\"`",
"\n",
... | // GetUsers returns all the users in the targeted environment | [
"GetUsers",
"returns",
"all",
"the",
"users",
"in",
"the",
"targeted",
"environment"
] | 5010c000047f246b870475e2c299556078cdad30 | https://github.com/cloudfoundry/cli/blob/5010c000047f246b870475e2c299556078cdad30/integration/helpers/user.go#L18-L56 |
25,968 | cloudfoundry/cli | api/cloudcontroller/ccv3/info.go | rootResponse | func (client *Client) rootResponse() (Info, Warnings, error) {
request, err := client.newHTTPRequest(requestOptions{
Method: http.MethodGet,
URL: client.cloudControllerURL,
})
if err != nil {
return Info{}, nil, err
}
var rootResponse Info
response := cloudcontroller.Response{
DecodeJSONResponseInto: ... | go | func (client *Client) rootResponse() (Info, Warnings, error) {
request, err := client.newHTTPRequest(requestOptions{
Method: http.MethodGet,
URL: client.cloudControllerURL,
})
if err != nil {
return Info{}, nil, err
}
var rootResponse Info
response := cloudcontroller.Response{
DecodeJSONResponseInto: ... | [
"func",
"(",
"client",
"*",
"Client",
")",
"rootResponse",
"(",
")",
"(",
"Info",
",",
"Warnings",
",",
"error",
")",
"{",
"request",
",",
"err",
":=",
"client",
".",
"newHTTPRequest",
"(",
"requestOptions",
"{",
"Method",
":",
"http",
".",
"MethodGet",
... | // rootResponse returns the CC API root document. | [
"rootResponse",
"returns",
"the",
"CC",
"API",
"root",
"document",
"."
] | 5010c000047f246b870475e2c299556078cdad30 | https://github.com/cloudfoundry/cli/blob/5010c000047f246b870475e2c299556078cdad30/api/cloudcontroller/ccv3/info.go#L135-L155 |
25,969 | cloudfoundry/cli | api/cloudcontroller/ccv3/application.go | MarshalJSON | func (a Application) MarshalJSON() ([]byte, error) {
ccApp := ccApplication{
Name: a.Name,
Relationships: a.Relationships,
Metadata: a.Metadata,
}
if a.LifecycleType == constant.AppLifecycleTypeDocker {
ccApp.setDockerLifecycle()
} else if a.LifecycleType == constant.AppLifecycleTypeBuildpack... | go | func (a Application) MarshalJSON() ([]byte, error) {
ccApp := ccApplication{
Name: a.Name,
Relationships: a.Relationships,
Metadata: a.Metadata,
}
if a.LifecycleType == constant.AppLifecycleTypeDocker {
ccApp.setDockerLifecycle()
} else if a.LifecycleType == constant.AppLifecycleTypeBuildpack... | [
"func",
"(",
"a",
"Application",
")",
"MarshalJSON",
"(",
")",
"(",
"[",
"]",
"byte",
",",
"error",
")",
"{",
"ccApp",
":=",
"ccApplication",
"{",
"Name",
":",
"a",
".",
"Name",
",",
"Relationships",
":",
"a",
".",
"Relationships",
",",
"Metadata",
"... | // MarshalJSON converts an Application into a Cloud Controller Application. | [
"MarshalJSON",
"converts",
"an",
"Application",
"into",
"a",
"Cloud",
"Controller",
"Application",
"."
] | 5010c000047f246b870475e2c299556078cdad30 | https://github.com/cloudfoundry/cli/blob/5010c000047f246b870475e2c299556078cdad30/api/cloudcontroller/ccv3/application.go#L34-L54 |
25,970 | cloudfoundry/cli | api/cloudcontroller/ccv3/application.go | GetApplications | func (client *Client) GetApplications(query ...Query) ([]Application, Warnings, error) {
request, err := client.newHTTPRequest(requestOptions{
RequestName: internal.GetApplicationsRequest,
Query: query,
})
if err != nil {
return nil, nil, err
}
var fullAppsList []Application
warnings, err := client.p... | go | func (client *Client) GetApplications(query ...Query) ([]Application, Warnings, error) {
request, err := client.newHTTPRequest(requestOptions{
RequestName: internal.GetApplicationsRequest,
Query: query,
})
if err != nil {
return nil, nil, err
}
var fullAppsList []Application
warnings, err := client.p... | [
"func",
"(",
"client",
"*",
"Client",
")",
"GetApplications",
"(",
"query",
"...",
"Query",
")",
"(",
"[",
"]",
"Application",
",",
"Warnings",
",",
"error",
")",
"{",
"request",
",",
"err",
":=",
"client",
".",
"newHTTPRequest",
"(",
"requestOptions",
"... | // GetApplications lists applications with optional queries. | [
"GetApplications",
"lists",
"applications",
"with",
"optional",
"queries",
"."
] | 5010c000047f246b870475e2c299556078cdad30 | https://github.com/cloudfoundry/cli/blob/5010c000047f246b870475e2c299556078cdad30/api/cloudcontroller/ccv3/application.go#L156-L179 |
25,971 | cloudfoundry/cli | api/cloudcontroller/ccv3/application.go | UpdateApplication | func (client *Client) UpdateApplication(app Application) (Application, Warnings, error) {
bodyBytes, err := json.Marshal(app)
if err != nil {
return Application{}, nil, err
}
request, err := client.newHTTPRequest(requestOptions{
RequestName: internal.PatchApplicationRequest,
Body: bytes.NewReader(body... | go | func (client *Client) UpdateApplication(app Application) (Application, Warnings, error) {
bodyBytes, err := json.Marshal(app)
if err != nil {
return Application{}, nil, err
}
request, err := client.newHTTPRequest(requestOptions{
RequestName: internal.PatchApplicationRequest,
Body: bytes.NewReader(body... | [
"func",
"(",
"client",
"*",
"Client",
")",
"UpdateApplication",
"(",
"app",
"Application",
")",
"(",
"Application",
",",
"Warnings",
",",
"error",
")",
"{",
"bodyBytes",
",",
"err",
":=",
"json",
".",
"Marshal",
"(",
"app",
")",
"\n",
"if",
"err",
"!="... | // UpdateApplication updates an application with the given settings. | [
"UpdateApplication",
"updates",
"an",
"application",
"with",
"the",
"given",
"settings",
"."
] | 5010c000047f246b870475e2c299556078cdad30 | https://github.com/cloudfoundry/cli/blob/5010c000047f246b870475e2c299556078cdad30/api/cloudcontroller/ccv3/application.go#L182-L204 |
25,972 | cloudfoundry/cli | api/cloudcontroller/ccv3/application.go | UpdateApplicationRestart | func (client *Client) UpdateApplicationRestart(appGUID string) (Application, Warnings, error) {
request, err := client.newHTTPRequest(requestOptions{
RequestName: internal.PostApplicationActionRestartRequest,
URIParams: map[string]string{"app_guid": appGUID},
})
if err != nil {
return Application{}, nil, err... | go | func (client *Client) UpdateApplicationRestart(appGUID string) (Application, Warnings, error) {
request, err := client.newHTTPRequest(requestOptions{
RequestName: internal.PostApplicationActionRestartRequest,
URIParams: map[string]string{"app_guid": appGUID},
})
if err != nil {
return Application{}, nil, err... | [
"func",
"(",
"client",
"*",
"Client",
")",
"UpdateApplicationRestart",
"(",
"appGUID",
"string",
")",
"(",
"Application",
",",
"Warnings",
",",
"error",
")",
"{",
"request",
",",
"err",
":=",
"client",
".",
"newHTTPRequest",
"(",
"requestOptions",
"{",
"Requ... | // UpdateApplicationRestart restarts the given application. | [
"UpdateApplicationRestart",
"restarts",
"the",
"given",
"application",
"."
] | 5010c000047f246b870475e2c299556078cdad30 | https://github.com/cloudfoundry/cli/blob/5010c000047f246b870475e2c299556078cdad30/api/cloudcontroller/ccv3/application.go#L207-L223 |
25,973 | cloudfoundry/cli | actor/v2action/application.go | CalculatedBuildpack | func (application Application) CalculatedBuildpack() string {
if application.Buildpack.IsSet {
return application.Buildpack.Value
}
return application.DetectedBuildpack.Value
} | go | func (application Application) CalculatedBuildpack() string {
if application.Buildpack.IsSet {
return application.Buildpack.Value
}
return application.DetectedBuildpack.Value
} | [
"func",
"(",
"application",
"Application",
")",
"CalculatedBuildpack",
"(",
")",
"string",
"{",
"if",
"application",
".",
"Buildpack",
".",
"IsSet",
"{",
"return",
"application",
".",
"Buildpack",
".",
"Value",
"\n",
"}",
"\n\n",
"return",
"application",
".",
... | // CalculatedBuildpack returns the buildpack that will be used. | [
"CalculatedBuildpack",
"returns",
"the",
"buildpack",
"that",
"will",
"be",
"used",
"."
] | 5010c000047f246b870475e2c299556078cdad30 | https://github.com/cloudfoundry/cli/blob/5010c000047f246b870475e2c299556078cdad30/actor/v2action/application.go#L25-L31 |
25,974 | cloudfoundry/cli | actor/v2action/application.go | CalculatedCommand | func (application Application) CalculatedCommand() string {
if application.Command.IsSet {
return application.Command.Value
}
return application.DetectedStartCommand.Value
} | go | func (application Application) CalculatedCommand() string {
if application.Command.IsSet {
return application.Command.Value
}
return application.DetectedStartCommand.Value
} | [
"func",
"(",
"application",
"Application",
")",
"CalculatedCommand",
"(",
")",
"string",
"{",
"if",
"application",
".",
"Command",
".",
"IsSet",
"{",
"return",
"application",
".",
"Command",
".",
"Value",
"\n",
"}",
"\n\n",
"return",
"application",
".",
"Det... | // CalculatedCommand returns the command that will be used. | [
"CalculatedCommand",
"returns",
"the",
"command",
"that",
"will",
"be",
"used",
"."
] | 5010c000047f246b870475e2c299556078cdad30 | https://github.com/cloudfoundry/cli/blob/5010c000047f246b870475e2c299556078cdad30/actor/v2action/application.go#L34-L40 |
25,975 | cloudfoundry/cli | actor/v2action/application.go | StagingFailedMessage | func (application Application) StagingFailedMessage() string {
if application.StagingFailedDescription != "" {
return application.StagingFailedDescription
}
return application.StagingFailedReason
} | go | func (application Application) StagingFailedMessage() string {
if application.StagingFailedDescription != "" {
return application.StagingFailedDescription
}
return application.StagingFailedReason
} | [
"func",
"(",
"application",
"Application",
")",
"StagingFailedMessage",
"(",
")",
"string",
"{",
"if",
"application",
".",
"StagingFailedDescription",
"!=",
"\"",
"\"",
"{",
"return",
"application",
".",
"StagingFailedDescription",
"\n",
"}",
"\n\n",
"return",
"ap... | // StagingFailedMessage returns the verbose description of the failure or
// the reason if the verbose description is empty. | [
"StagingFailedMessage",
"returns",
"the",
"verbose",
"description",
"of",
"the",
"failure",
"or",
"the",
"reason",
"if",
"the",
"verbose",
"description",
"is",
"empty",
"."
] | 5010c000047f246b870475e2c299556078cdad30 | https://github.com/cloudfoundry/cli/blob/5010c000047f246b870475e2c299556078cdad30/actor/v2action/application.go#L64-L70 |
25,976 | cloudfoundry/cli | actor/v2action/application.go | CreateApplication | func (actor Actor) CreateApplication(application Application) (Application, Warnings, error) {
app, warnings, err := actor.CloudControllerClient.CreateApplication(ccv2.Application(application))
return Application(app), Warnings(warnings), err
} | go | func (actor Actor) CreateApplication(application Application) (Application, Warnings, error) {
app, warnings, err := actor.CloudControllerClient.CreateApplication(ccv2.Application(application))
return Application(app), Warnings(warnings), err
} | [
"func",
"(",
"actor",
"Actor",
")",
"CreateApplication",
"(",
"application",
"Application",
")",
"(",
"Application",
",",
"Warnings",
",",
"error",
")",
"{",
"app",
",",
"warnings",
",",
"err",
":=",
"actor",
".",
"CloudControllerClient",
".",
"CreateApplicati... | // CreateApplication creates an application. | [
"CreateApplication",
"creates",
"an",
"application",
"."
] | 5010c000047f246b870475e2c299556078cdad30 | https://github.com/cloudfoundry/cli/blob/5010c000047f246b870475e2c299556078cdad30/actor/v2action/application.go#L115-L118 |
25,977 | cloudfoundry/cli | actor/v2action/application.go | GetApplication | func (actor Actor) GetApplication(guid string) (Application, Warnings, error) {
app, warnings, err := actor.CloudControllerClient.GetApplication(guid)
if _, ok := err.(ccerror.ResourceNotFoundError); ok {
return Application{}, Warnings(warnings), actionerror.ApplicationNotFoundError{GUID: guid}
}
return Applica... | go | func (actor Actor) GetApplication(guid string) (Application, Warnings, error) {
app, warnings, err := actor.CloudControllerClient.GetApplication(guid)
if _, ok := err.(ccerror.ResourceNotFoundError); ok {
return Application{}, Warnings(warnings), actionerror.ApplicationNotFoundError{GUID: guid}
}
return Applica... | [
"func",
"(",
"actor",
"Actor",
")",
"GetApplication",
"(",
"guid",
"string",
")",
"(",
"Application",
",",
"Warnings",
",",
"error",
")",
"{",
"app",
",",
"warnings",
",",
"err",
":=",
"actor",
".",
"CloudControllerClient",
".",
"GetApplication",
"(",
"gui... | // GetApplication returns the application. | [
"GetApplication",
"returns",
"the",
"application",
"."
] | 5010c000047f246b870475e2c299556078cdad30 | https://github.com/cloudfoundry/cli/blob/5010c000047f246b870475e2c299556078cdad30/actor/v2action/application.go#L121-L129 |
25,978 | cloudfoundry/cli | actor/v2action/application.go | GetApplicationByNameAndSpace | func (actor Actor) GetApplicationByNameAndSpace(name string, spaceGUID string) (Application, Warnings, error) {
app, warnings, err := actor.CloudControllerClient.GetApplications(
ccv2.Filter{
Type: constant.NameFilter,
Operator: constant.EqualOperator,
Values: []string{name},
},
ccv2.Filter{
Ty... | go | func (actor Actor) GetApplicationByNameAndSpace(name string, spaceGUID string) (Application, Warnings, error) {
app, warnings, err := actor.CloudControllerClient.GetApplications(
ccv2.Filter{
Type: constant.NameFilter,
Operator: constant.EqualOperator,
Values: []string{name},
},
ccv2.Filter{
Ty... | [
"func",
"(",
"actor",
"Actor",
")",
"GetApplicationByNameAndSpace",
"(",
"name",
"string",
",",
"spaceGUID",
"string",
")",
"(",
"Application",
",",
"Warnings",
",",
"error",
")",
"{",
"app",
",",
"warnings",
",",
"err",
":=",
"actor",
".",
"CloudControllerC... | // GetApplicationByNameAndSpace returns an application with matching name in
// the space. | [
"GetApplicationByNameAndSpace",
"returns",
"an",
"application",
"with",
"matching",
"name",
"in",
"the",
"space",
"."
] | 5010c000047f246b870475e2c299556078cdad30 | https://github.com/cloudfoundry/cli/blob/5010c000047f246b870475e2c299556078cdad30/actor/v2action/application.go#L133-L158 |
25,979 | cloudfoundry/cli | actor/v2action/application.go | GetRouteApplications | func (actor Actor) GetRouteApplications(routeGUID string) ([]Application, Warnings, error) {
apps, warnings, err := actor.CloudControllerClient.GetRouteApplications(routeGUID)
if err != nil {
return nil, Warnings(warnings), err
}
allApplications := []Application{}
for _, app := range apps {
allApplications = a... | go | func (actor Actor) GetRouteApplications(routeGUID string) ([]Application, Warnings, error) {
apps, warnings, err := actor.CloudControllerClient.GetRouteApplications(routeGUID)
if err != nil {
return nil, Warnings(warnings), err
}
allApplications := []Application{}
for _, app := range apps {
allApplications = a... | [
"func",
"(",
"actor",
"Actor",
")",
"GetRouteApplications",
"(",
"routeGUID",
"string",
")",
"(",
"[",
"]",
"Application",
",",
"Warnings",
",",
"error",
")",
"{",
"apps",
",",
"warnings",
",",
"err",
":=",
"actor",
".",
"CloudControllerClient",
".",
"GetR... | // GetRouteApplications returns a list of apps associated with the provided
// Route GUID. | [
"GetRouteApplications",
"returns",
"a",
"list",
"of",
"apps",
"associated",
"with",
"the",
"provided",
"Route",
"GUID",
"."
] | 5010c000047f246b870475e2c299556078cdad30 | https://github.com/cloudfoundry/cli/blob/5010c000047f246b870475e2c299556078cdad30/actor/v2action/application.go#L184-L194 |
25,980 | cloudfoundry/cli | actor/v2action/application.go | SetApplicationHealthCheckTypeByNameAndSpace | func (actor Actor) SetApplicationHealthCheckTypeByNameAndSpace(name string, spaceGUID string, healthCheckType constant.ApplicationHealthCheckType, httpEndpoint string) (Application, Warnings, error) {
if httpEndpoint != "/" && healthCheckType != constant.ApplicationHealthCheckHTTP {
return Application{}, nil, action... | go | func (actor Actor) SetApplicationHealthCheckTypeByNameAndSpace(name string, spaceGUID string, healthCheckType constant.ApplicationHealthCheckType, httpEndpoint string) (Application, Warnings, error) {
if httpEndpoint != "/" && healthCheckType != constant.ApplicationHealthCheckHTTP {
return Application{}, nil, action... | [
"func",
"(",
"actor",
"Actor",
")",
"SetApplicationHealthCheckTypeByNameAndSpace",
"(",
"name",
"string",
",",
"spaceGUID",
"string",
",",
"healthCheckType",
"constant",
".",
"ApplicationHealthCheckType",
",",
"httpEndpoint",
"string",
")",
"(",
"Application",
",",
"W... | // SetApplicationHealthCheckTypeByNameAndSpace updates an application's health
// check type if it is not already the desired type. | [
"SetApplicationHealthCheckTypeByNameAndSpace",
"updates",
"an",
"application",
"s",
"health",
"check",
"type",
"if",
"it",
"is",
"not",
"already",
"the",
"desired",
"type",
"."
] | 5010c000047f246b870475e2c299556078cdad30 | https://github.com/cloudfoundry/cli/blob/5010c000047f246b870475e2c299556078cdad30/actor/v2action/application.go#L198-L230 |
25,981 | cloudfoundry/cli | actor/v2action/application.go | StartApplication | func (actor Actor) StartApplication(app Application, client NOAAClient) (<-chan *LogMessage, <-chan error, <-chan ApplicationStateChange, <-chan string, <-chan error) {
messages, logErrs := actor.GetStreamingLogs(app.GUID, client)
appState := make(chan ApplicationStateChange)
allWarnings := make(chan string)
errs ... | go | func (actor Actor) StartApplication(app Application, client NOAAClient) (<-chan *LogMessage, <-chan error, <-chan ApplicationStateChange, <-chan string, <-chan error) {
messages, logErrs := actor.GetStreamingLogs(app.GUID, client)
appState := make(chan ApplicationStateChange)
allWarnings := make(chan string)
errs ... | [
"func",
"(",
"actor",
"Actor",
")",
"StartApplication",
"(",
"app",
"Application",
",",
"client",
"NOAAClient",
")",
"(",
"<-",
"chan",
"*",
"LogMessage",
",",
"<-",
"chan",
"error",
",",
"<-",
"chan",
"ApplicationStateChange",
",",
"<-",
"chan",
"string",
... | // StartApplication restarts a given application. If already stopped, no stop
// call will be sent. | [
"StartApplication",
"restarts",
"a",
"given",
"application",
".",
"If",
"already",
"stopped",
"no",
"stop",
"call",
"will",
"be",
"sent",
"."
] | 5010c000047f246b870475e2c299556078cdad30 | https://github.com/cloudfoundry/cli/blob/5010c000047f246b870475e2c299556078cdad30/actor/v2action/application.go#L234-L267 |
25,982 | cloudfoundry/cli | actor/v2action/application.go | RestageApplication | func (actor Actor) RestageApplication(app Application, client NOAAClient) (<-chan *LogMessage, <-chan error, <-chan ApplicationStateChange, <-chan string, <-chan error) {
messages, logErrs := actor.GetStreamingLogs(app.GUID, client)
appState := make(chan ApplicationStateChange)
allWarnings := make(chan string)
err... | go | func (actor Actor) RestageApplication(app Application, client NOAAClient) (<-chan *LogMessage, <-chan error, <-chan ApplicationStateChange, <-chan string, <-chan error) {
messages, logErrs := actor.GetStreamingLogs(app.GUID, client)
appState := make(chan ApplicationStateChange)
allWarnings := make(chan string)
err... | [
"func",
"(",
"actor",
"Actor",
")",
"RestageApplication",
"(",
"app",
"Application",
",",
"client",
"NOAAClient",
")",
"(",
"<-",
"chan",
"*",
"LogMessage",
",",
"<-",
"chan",
"error",
",",
"<-",
"chan",
"ApplicationStateChange",
",",
"<-",
"chan",
"string",... | // RestageApplication restarts a given application. If already stopped, no stop
// call will be sent. | [
"RestageApplication",
"restarts",
"a",
"given",
"application",
".",
"If",
"already",
"stopped",
"no",
"stop",
"call",
"will",
"be",
"sent",
"."
] | 5010c000047f246b870475e2c299556078cdad30 | https://github.com/cloudfoundry/cli/blob/5010c000047f246b870475e2c299556078cdad30/actor/v2action/application.go#L323-L352 |
25,983 | cloudfoundry/cli | api/router/router_group.go | GetRouterGroupByName | func (client *Client) GetRouterGroupByName(name string) (RouterGroup, error) {
request, err := client.newHTTPRequest(requestOptions{
RequestName: internal.GetRouterGroups,
Query: url.Values{"name": []string{name}},
})
if err != nil {
return RouterGroup{}, err
}
var routerGroups []RouterGroup
var res... | go | func (client *Client) GetRouterGroupByName(name string) (RouterGroup, error) {
request, err := client.newHTTPRequest(requestOptions{
RequestName: internal.GetRouterGroups,
Query: url.Values{"name": []string{name}},
})
if err != nil {
return RouterGroup{}, err
}
var routerGroups []RouterGroup
var res... | [
"func",
"(",
"client",
"*",
"Client",
")",
"GetRouterGroupByName",
"(",
"name",
"string",
")",
"(",
"RouterGroup",
",",
"error",
")",
"{",
"request",
",",
"err",
":=",
"client",
".",
"newHTTPRequest",
"(",
"requestOptions",
"{",
"RequestName",
":",
"internal... | // GetRouterGroupByName returns a list of RouterGroups. | [
"GetRouterGroupByName",
"returns",
"a",
"list",
"of",
"RouterGroups",
"."
] | 5010c000047f246b870475e2c299556078cdad30 | https://github.com/cloudfoundry/cli/blob/5010c000047f246b870475e2c299556078cdad30/api/router/router_group.go#L19-L46 |
25,984 | cloudfoundry/cli | api/cloudcontroller/ccv3/build.go | MarshalJSON | func (b Build) MarshalJSON() ([]byte, error) {
var ccBuild struct {
Package struct {
GUID string `json:"guid"`
} `json:"package"`
}
ccBuild.Package.GUID = b.PackageGUID
return json.Marshal(ccBuild)
} | go | func (b Build) MarshalJSON() ([]byte, error) {
var ccBuild struct {
Package struct {
GUID string `json:"guid"`
} `json:"package"`
}
ccBuild.Package.GUID = b.PackageGUID
return json.Marshal(ccBuild)
} | [
"func",
"(",
"b",
"Build",
")",
"MarshalJSON",
"(",
")",
"(",
"[",
"]",
"byte",
",",
"error",
")",
"{",
"var",
"ccBuild",
"struct",
"{",
"Package",
"struct",
"{",
"GUID",
"string",
"`json:\"guid\"`",
"\n",
"}",
"`json:\"package\"`",
"\n",
"}",
"\n\n",
... | // MarshalJSON converts a Build into a Cloud Controller Application. | [
"MarshalJSON",
"converts",
"a",
"Build",
"into",
"a",
"Cloud",
"Controller",
"Application",
"."
] | 5010c000047f246b870475e2c299556078cdad30 | https://github.com/cloudfoundry/cli/blob/5010c000047f246b870475e2c299556078cdad30/api/cloudcontroller/ccv3/build.go#L31-L41 |
25,985 | cloudfoundry/cli | api/cloudcontroller/ccv3/build.go | UnmarshalJSON | func (b *Build) UnmarshalJSON(data []byte) error {
var ccBuild struct {
CreatedAt string `json:"created_at,omitempty"`
GUID string `json:"guid,omitempty"`
Error string `json:"error"`
Package struct {
GUID string `json:"guid"`
} `json:"package"`
State constant.BuildState `json:"state,omitemp... | go | func (b *Build) UnmarshalJSON(data []byte) error {
var ccBuild struct {
CreatedAt string `json:"created_at,omitempty"`
GUID string `json:"guid,omitempty"`
Error string `json:"error"`
Package struct {
GUID string `json:"guid"`
} `json:"package"`
State constant.BuildState `json:"state,omitemp... | [
"func",
"(",
"b",
"*",
"Build",
")",
"UnmarshalJSON",
"(",
"data",
"[",
"]",
"byte",
")",
"error",
"{",
"var",
"ccBuild",
"struct",
"{",
"CreatedAt",
"string",
"`json:\"created_at,omitempty\"`",
"\n",
"GUID",
"string",
"`json:\"guid,omitempty\"`",
"\n",
"Error",... | // UnmarshalJSON helps unmarshal a Cloud Controller Build response. | [
"UnmarshalJSON",
"helps",
"unmarshal",
"a",
"Cloud",
"Controller",
"Build",
"response",
"."
] | 5010c000047f246b870475e2c299556078cdad30 | https://github.com/cloudfoundry/cli/blob/5010c000047f246b870475e2c299556078cdad30/api/cloudcontroller/ccv3/build.go#L44-L71 |
25,986 | cloudfoundry/cli | api/cloudcontroller/ccv3/build.go | CreateBuild | func (client *Client) CreateBuild(build Build) (Build, Warnings, error) {
bodyBytes, err := json.Marshal(build)
if err != nil {
return Build{}, nil, err
}
request, err := client.newHTTPRequest(requestOptions{
RequestName: internal.PostBuildRequest,
Body: bytes.NewReader(bodyBytes),
})
if err != nil ... | go | func (client *Client) CreateBuild(build Build) (Build, Warnings, error) {
bodyBytes, err := json.Marshal(build)
if err != nil {
return Build{}, nil, err
}
request, err := client.newHTTPRequest(requestOptions{
RequestName: internal.PostBuildRequest,
Body: bytes.NewReader(bodyBytes),
})
if err != nil ... | [
"func",
"(",
"client",
"*",
"Client",
")",
"CreateBuild",
"(",
"build",
"Build",
")",
"(",
"Build",
",",
"Warnings",
",",
"error",
")",
"{",
"bodyBytes",
",",
"err",
":=",
"json",
".",
"Marshal",
"(",
"build",
")",
"\n",
"if",
"err",
"!=",
"nil",
"... | // CreateBuild creates the given build, requires Package GUID to be set on the
// build. | [
"CreateBuild",
"creates",
"the",
"given",
"build",
"requires",
"Package",
"GUID",
"to",
"be",
"set",
"on",
"the",
"build",
"."
] | 5010c000047f246b870475e2c299556078cdad30 | https://github.com/cloudfoundry/cli/blob/5010c000047f246b870475e2c299556078cdad30/api/cloudcontroller/ccv3/build.go#L75-L96 |
25,987 | cloudfoundry/cli | api/cloudcontroller/ccv3/build.go | GetBuild | func (client *Client) GetBuild(guid string) (Build, Warnings, error) {
request, err := client.newHTTPRequest(requestOptions{
RequestName: internal.GetBuildRequest,
URIParams: internal.Params{"build_guid": guid},
})
if err != nil {
return Build{}, nil, err
}
var responseBuild Build
response := cloudcontro... | go | func (client *Client) GetBuild(guid string) (Build, Warnings, error) {
request, err := client.newHTTPRequest(requestOptions{
RequestName: internal.GetBuildRequest,
URIParams: internal.Params{"build_guid": guid},
})
if err != nil {
return Build{}, nil, err
}
var responseBuild Build
response := cloudcontro... | [
"func",
"(",
"client",
"*",
"Client",
")",
"GetBuild",
"(",
"guid",
"string",
")",
"(",
"Build",
",",
"Warnings",
",",
"error",
")",
"{",
"request",
",",
"err",
":=",
"client",
".",
"newHTTPRequest",
"(",
"requestOptions",
"{",
"RequestName",
":",
"inter... | // GetBuild gets the build with the given GUID. | [
"GetBuild",
"gets",
"the",
"build",
"with",
"the",
"given",
"GUID",
"."
] | 5010c000047f246b870475e2c299556078cdad30 | https://github.com/cloudfoundry/cli/blob/5010c000047f246b870475e2c299556078cdad30/api/cloudcontroller/ccv3/build.go#L99-L115 |
25,988 | cloudfoundry/cli | actor/v3action/environment_variable.go | GetEnvironmentVariablesByApplicationNameAndSpace | func (actor *Actor) GetEnvironmentVariablesByApplicationNameAndSpace(appName string, spaceGUID string) (EnvironmentVariableGroups, Warnings, error) {
app, warnings, appErr := actor.GetApplicationByNameAndSpace(appName, spaceGUID)
if appErr != nil {
return EnvironmentVariableGroups{}, warnings, appErr
}
ccEnvGrou... | go | func (actor *Actor) GetEnvironmentVariablesByApplicationNameAndSpace(appName string, spaceGUID string) (EnvironmentVariableGroups, Warnings, error) {
app, warnings, appErr := actor.GetApplicationByNameAndSpace(appName, spaceGUID)
if appErr != nil {
return EnvironmentVariableGroups{}, warnings, appErr
}
ccEnvGrou... | [
"func",
"(",
"actor",
"*",
"Actor",
")",
"GetEnvironmentVariablesByApplicationNameAndSpace",
"(",
"appName",
"string",
",",
"spaceGUID",
"string",
")",
"(",
"EnvironmentVariableGroups",
",",
"Warnings",
",",
"error",
")",
"{",
"app",
",",
"warnings",
",",
"appErr"... | // GetEnvironmentVariablesByApplicationNameAndSpace returns the environment
// variables for an application. | [
"GetEnvironmentVariablesByApplicationNameAndSpace",
"returns",
"the",
"environment",
"variables",
"for",
"an",
"application",
"."
] | 5010c000047f246b870475e2c299556078cdad30 | https://github.com/cloudfoundry/cli/blob/5010c000047f246b870475e2c299556078cdad30/actor/v3action/environment_variable.go#L20-L29 |
25,989 | cloudfoundry/cli | actor/v3action/environment_variable.go | SetEnvironmentVariableByApplicationNameAndSpace | func (actor *Actor) SetEnvironmentVariableByApplicationNameAndSpace(appName string, spaceGUID string, envPair EnvironmentVariablePair) (Warnings, error) {
app, warnings, err := actor.GetApplicationByNameAndSpace(appName, spaceGUID)
if err != nil {
return warnings, err
}
_, v3Warnings, apiErr := actor.CloudContro... | go | func (actor *Actor) SetEnvironmentVariableByApplicationNameAndSpace(appName string, spaceGUID string, envPair EnvironmentVariablePair) (Warnings, error) {
app, warnings, err := actor.GetApplicationByNameAndSpace(appName, spaceGUID)
if err != nil {
return warnings, err
}
_, v3Warnings, apiErr := actor.CloudContro... | [
"func",
"(",
"actor",
"*",
"Actor",
")",
"SetEnvironmentVariableByApplicationNameAndSpace",
"(",
"appName",
"string",
",",
"spaceGUID",
"string",
",",
"envPair",
"EnvironmentVariablePair",
")",
"(",
"Warnings",
",",
"error",
")",
"{",
"app",
",",
"warnings",
",",
... | // SetEnvironmentVariableByApplicationNameAndSpace adds an
// EnvironmentVariablePair to an application. It must be restarted for changes
// to take effect. | [
"SetEnvironmentVariableByApplicationNameAndSpace",
"adds",
"an",
"EnvironmentVariablePair",
"to",
"an",
"application",
".",
"It",
"must",
"be",
"restarted",
"for",
"changes",
"to",
"take",
"effect",
"."
] | 5010c000047f246b870475e2c299556078cdad30 | https://github.com/cloudfoundry/cli/blob/5010c000047f246b870475e2c299556078cdad30/actor/v3action/environment_variable.go#L34-L47 |
25,990 | cloudfoundry/cli | actor/v3action/environment_variable.go | UnsetEnvironmentVariableByApplicationNameAndSpace | func (actor *Actor) UnsetEnvironmentVariableByApplicationNameAndSpace(appName string, spaceGUID string, environmentVariableName string) (Warnings, error) {
app, warnings, appErr := actor.GetApplicationByNameAndSpace(appName, spaceGUID)
if appErr != nil {
return warnings, appErr
}
envGroups, getWarnings, getErr :=... | go | func (actor *Actor) UnsetEnvironmentVariableByApplicationNameAndSpace(appName string, spaceGUID string, environmentVariableName string) (Warnings, error) {
app, warnings, appErr := actor.GetApplicationByNameAndSpace(appName, spaceGUID)
if appErr != nil {
return warnings, appErr
}
envGroups, getWarnings, getErr :=... | [
"func",
"(",
"actor",
"*",
"Actor",
")",
"UnsetEnvironmentVariableByApplicationNameAndSpace",
"(",
"appName",
"string",
",",
"spaceGUID",
"string",
",",
"environmentVariableName",
"string",
")",
"(",
"Warnings",
",",
"error",
")",
"{",
"app",
",",
"warnings",
",",... | // UnsetEnvironmentVariableByApplicationNameAndSpace removes an enviornment
// variable from an application. It must be restarted for changes to take
// effect. | [
"UnsetEnvironmentVariableByApplicationNameAndSpace",
"removes",
"an",
"enviornment",
"variable",
"from",
"an",
"application",
".",
"It",
"must",
"be",
"restarted",
"for",
"changes",
"to",
"take",
"effect",
"."
] | 5010c000047f246b870475e2c299556078cdad30 | https://github.com/cloudfoundry/cli/blob/5010c000047f246b870475e2c299556078cdad30/actor/v3action/environment_variable.go#L52-L74 |
25,991 | cloudfoundry/cli | util/ui/prompt.go | DisplayBoolPrompt | func (ui *UI) DisplayBoolPrompt(defaultResponse bool, template string, templateValues ...map[string]interface{}) (bool, error) {
ui.terminalLock.Lock()
defer ui.terminalLock.Unlock()
response := defaultResponse
interactivePrompt := ui.Interactor.NewInteraction(ui.TranslateText(template, templateValues...))
intera... | go | func (ui *UI) DisplayBoolPrompt(defaultResponse bool, template string, templateValues ...map[string]interface{}) (bool, error) {
ui.terminalLock.Lock()
defer ui.terminalLock.Unlock()
response := defaultResponse
interactivePrompt := ui.Interactor.NewInteraction(ui.TranslateText(template, templateValues...))
intera... | [
"func",
"(",
"ui",
"*",
"UI",
")",
"DisplayBoolPrompt",
"(",
"defaultResponse",
"bool",
",",
"template",
"string",
",",
"templateValues",
"...",
"map",
"[",
"string",
"]",
"interface",
"{",
"}",
")",
"(",
"bool",
",",
"error",
")",
"{",
"ui",
".",
"ter... | // DisplayBoolPrompt outputs the prompt and waits for user input. It only
// allows for a boolean response. A default boolean response can be set with
// defaultResponse. | [
"DisplayBoolPrompt",
"outputs",
"the",
"prompt",
"and",
"waits",
"for",
"user",
"input",
".",
"It",
"only",
"allows",
"for",
"a",
"boolean",
"response",
".",
"A",
"default",
"boolean",
"response",
"can",
"be",
"set",
"with",
"defaultResponse",
"."
] | 5010c000047f246b870475e2c299556078cdad30 | https://github.com/cloudfoundry/cli/blob/5010c000047f246b870475e2c299556078cdad30/util/ui/prompt.go#L36-L49 |
25,992 | cloudfoundry/cli | util/ui/prompt.go | DisplayPasswordPrompt | func (ui *UI) DisplayPasswordPrompt(template string, templateValues ...map[string]interface{}) (string, error) {
ui.terminalLock.Lock()
defer ui.terminalLock.Unlock()
var password interact.Password
interactivePrompt := ui.Interactor.NewInteraction(ui.TranslateText(template, templateValues...))
interactivePrompt.S... | go | func (ui *UI) DisplayPasswordPrompt(template string, templateValues ...map[string]interface{}) (string, error) {
ui.terminalLock.Lock()
defer ui.terminalLock.Unlock()
var password interact.Password
interactivePrompt := ui.Interactor.NewInteraction(ui.TranslateText(template, templateValues...))
interactivePrompt.S... | [
"func",
"(",
"ui",
"*",
"UI",
")",
"DisplayPasswordPrompt",
"(",
"template",
"string",
",",
"templateValues",
"...",
"map",
"[",
"string",
"]",
"interface",
"{",
"}",
")",
"(",
"string",
",",
"error",
")",
"{",
"ui",
".",
"terminalLock",
".",
"Lock",
"... | // DisplayPasswordPrompt outputs the prompt and waits for user input. Hides
// user's response from the screen. | [
"DisplayPasswordPrompt",
"outputs",
"the",
"prompt",
"and",
"waits",
"for",
"user",
"input",
".",
"Hides",
"user",
"s",
"response",
"from",
"the",
"screen",
"."
] | 5010c000047f246b870475e2c299556078cdad30 | https://github.com/cloudfoundry/cli/blob/5010c000047f246b870475e2c299556078cdad30/util/ui/prompt.go#L66-L79 |
25,993 | cloudfoundry/cli | util/ui/prompt.go | DisplayTextMenu | func (ui *UI) DisplayTextMenu(choices []string, promptTemplate string, templateValues ...map[string]interface{}) (string, error) {
for i, c := range choices {
t := fmt.Sprintf("%d. %s", i+1, c)
ui.DisplayText(t)
}
translatedPrompt := ui.TranslateText(promptTemplate, templateValues...)
interactivePrompt := ui.... | go | func (ui *UI) DisplayTextMenu(choices []string, promptTemplate string, templateValues ...map[string]interface{}) (string, error) {
for i, c := range choices {
t := fmt.Sprintf("%d. %s", i+1, c)
ui.DisplayText(t)
}
translatedPrompt := ui.TranslateText(promptTemplate, templateValues...)
interactivePrompt := ui.... | [
"func",
"(",
"ui",
"*",
"UI",
")",
"DisplayTextMenu",
"(",
"choices",
"[",
"]",
"string",
",",
"promptTemplate",
"string",
",",
"templateValues",
"...",
"map",
"[",
"string",
"]",
"interface",
"{",
"}",
")",
"(",
"string",
",",
"error",
")",
"{",
"for"... | // DisplayTextMenu lets the user choose from a list of options, either by name
// or by number. | [
"DisplayTextMenu",
"lets",
"the",
"user",
"choose",
"from",
"a",
"list",
"of",
"options",
"either",
"by",
"name",
"or",
"by",
"number",
"."
] | 5010c000047f246b870475e2c299556078cdad30 | https://github.com/cloudfoundry/cli/blob/5010c000047f246b870475e2c299556078cdad30/util/ui/prompt.go#L83-L123 |
25,994 | cloudfoundry/cli | util/ui/prompt.go | DisplayTextPrompt | func (ui *UI) DisplayTextPrompt(template string, templateValues ...map[string]interface{}) (string, error) {
interactivePrompt := ui.Interactor.NewInteraction(ui.TranslateText(template, templateValues...))
var value string
interactivePrompt.SetIn(ui.In)
interactivePrompt.SetOut(ui.OutForInteration)
err := interact... | go | func (ui *UI) DisplayTextPrompt(template string, templateValues ...map[string]interface{}) (string, error) {
interactivePrompt := ui.Interactor.NewInteraction(ui.TranslateText(template, templateValues...))
var value string
interactivePrompt.SetIn(ui.In)
interactivePrompt.SetOut(ui.OutForInteration)
err := interact... | [
"func",
"(",
"ui",
"*",
"UI",
")",
"DisplayTextPrompt",
"(",
"template",
"string",
",",
"templateValues",
"...",
"map",
"[",
"string",
"]",
"interface",
"{",
"}",
")",
"(",
"string",
",",
"error",
")",
"{",
"interactivePrompt",
":=",
"ui",
".",
"Interact... | // DisplayTextPrompt outputs the prompt and waits for user input. | [
"DisplayTextPrompt",
"outputs",
"the",
"prompt",
"and",
"waits",
"for",
"user",
"input",
"."
] | 5010c000047f246b870475e2c299556078cdad30 | https://github.com/cloudfoundry/cli/blob/5010c000047f246b870475e2c299556078cdad30/util/ui/prompt.go#L126-L136 |
25,995 | cloudfoundry/cli | api/cloudcontroller/ccv2/route.go | UnmarshalJSON | func (route *Route) UnmarshalJSON(data []byte) error {
var ccRoute struct {
Metadata internal.Metadata `json:"metadata"`
Entity struct {
Host string `json:"host"`
Path string `json:"path"`
Port types.NullInt `json:"port"`
DomainGUID string `json:"domain_guid"`
... | go | func (route *Route) UnmarshalJSON(data []byte) error {
var ccRoute struct {
Metadata internal.Metadata `json:"metadata"`
Entity struct {
Host string `json:"host"`
Path string `json:"path"`
Port types.NullInt `json:"port"`
DomainGUID string `json:"domain_guid"`
... | [
"func",
"(",
"route",
"*",
"Route",
")",
"UnmarshalJSON",
"(",
"data",
"[",
"]",
"byte",
")",
"error",
"{",
"var",
"ccRoute",
"struct",
"{",
"Metadata",
"internal",
".",
"Metadata",
"`json:\"metadata\"`",
"\n",
"Entity",
"struct",
"{",
"Host",
"string",
"`... | // UnmarshalJSON helps unmarshal a Cloud Controller Route response. | [
"UnmarshalJSON",
"helps",
"unmarshal",
"a",
"Cloud",
"Controller",
"Route",
"response",
"."
] | 5010c000047f246b870475e2c299556078cdad30 | https://github.com/cloudfoundry/cli/blob/5010c000047f246b870475e2c299556078cdad30/api/cloudcontroller/ccv2/route.go#L39-L62 |
25,996 | cloudfoundry/cli | api/cloudcontroller/ccv2/route.go | CheckRoute | func (client *Client) CheckRoute(route Route) (bool, Warnings, error) {
request, err := client.newHTTPRequest(requestOptions{
RequestName: internal.GetRouteReservedRequest,
URIParams: map[string]string{"domain_guid": route.DomainGUID},
})
if err != nil {
return false, nil, err
}
queryParams := url.Values{... | go | func (client *Client) CheckRoute(route Route) (bool, Warnings, error) {
request, err := client.newHTTPRequest(requestOptions{
RequestName: internal.GetRouteReservedRequest,
URIParams: map[string]string{"domain_guid": route.DomainGUID},
})
if err != nil {
return false, nil, err
}
queryParams := url.Values{... | [
"func",
"(",
"client",
"*",
"Client",
")",
"CheckRoute",
"(",
"route",
"Route",
")",
"(",
"bool",
",",
"Warnings",
",",
"error",
")",
"{",
"request",
",",
"err",
":=",
"client",
".",
"newHTTPRequest",
"(",
"requestOptions",
"{",
"RequestName",
":",
"inte... | // CheckRoute returns true if the route exists in the CF instance. | [
"CheckRoute",
"returns",
"true",
"if",
"the",
"route",
"exists",
"in",
"the",
"CF",
"instance",
"."
] | 5010c000047f246b870475e2c299556078cdad30 | https://github.com/cloudfoundry/cli/blob/5010c000047f246b870475e2c299556078cdad30/api/cloudcontroller/ccv2/route.go#L65-L93 |
25,997 | cloudfoundry/cli | api/cloudcontroller/ccv2/route.go | DeleteRouteApplication | func (client *Client) DeleteRouteApplication(routeGUID string, appGUID string) (Warnings, error) {
request, err := client.newHTTPRequest(requestOptions{
RequestName: internal.DeleteRouteAppRequest,
URIParams: map[string]string{
"app_guid": appGUID,
"route_guid": routeGUID,
},
})
if err != nil {
retur... | go | func (client *Client) DeleteRouteApplication(routeGUID string, appGUID string) (Warnings, error) {
request, err := client.newHTTPRequest(requestOptions{
RequestName: internal.DeleteRouteAppRequest,
URIParams: map[string]string{
"app_guid": appGUID,
"route_guid": routeGUID,
},
})
if err != nil {
retur... | [
"func",
"(",
"client",
"*",
"Client",
")",
"DeleteRouteApplication",
"(",
"routeGUID",
"string",
",",
"appGUID",
"string",
")",
"(",
"Warnings",
",",
"error",
")",
"{",
"request",
",",
"err",
":=",
"client",
".",
"newHTTPRequest",
"(",
"requestOptions",
"{",... | // DeleteRouteApplication removes the link between the route and application. | [
"DeleteRouteApplication",
"removes",
"the",
"link",
"between",
"the",
"route",
"and",
"application",
"."
] | 5010c000047f246b870475e2c299556078cdad30 | https://github.com/cloudfoundry/cli/blob/5010c000047f246b870475e2c299556078cdad30/api/cloudcontroller/ccv2/route.go#L146-L161 |
25,998 | cloudfoundry/cli | api/cloudcontroller/ccv2/route.go | DeleteSpaceUnmappedRoutes | func (client *Client) DeleteSpaceUnmappedRoutes(spaceGUID string) (Warnings, error) {
request, err := client.newHTTPRequest(requestOptions{
RequestName: internal.DeleteSpaceUnmappedRoutesRequest,
URIParams: map[string]string{"space_guid": spaceGUID},
})
if err != nil {
return nil, err
}
var response cloud... | go | func (client *Client) DeleteSpaceUnmappedRoutes(spaceGUID string) (Warnings, error) {
request, err := client.newHTTPRequest(requestOptions{
RequestName: internal.DeleteSpaceUnmappedRoutesRequest,
URIParams: map[string]string{"space_guid": spaceGUID},
})
if err != nil {
return nil, err
}
var response cloud... | [
"func",
"(",
"client",
"*",
"Client",
")",
"DeleteSpaceUnmappedRoutes",
"(",
"spaceGUID",
"string",
")",
"(",
"Warnings",
",",
"error",
")",
"{",
"request",
",",
"err",
":=",
"client",
".",
"newHTTPRequest",
"(",
"requestOptions",
"{",
"RequestName",
":",
"i... | // DeleteSpaceUnmappedRoutes deletes Routes within a specified Space not mapped
// to an Application | [
"DeleteSpaceUnmappedRoutes",
"deletes",
"Routes",
"within",
"a",
"specified",
"Space",
"not",
"mapped",
"to",
"an",
"Application"
] | 5010c000047f246b870475e2c299556078cdad30 | https://github.com/cloudfoundry/cli/blob/5010c000047f246b870475e2c299556078cdad30/api/cloudcontroller/ccv2/route.go#L165-L177 |
25,999 | cloudfoundry/cli | api/cloudcontroller/ccv2/route.go | GetRoute | func (client *Client) GetRoute(guid string) (Route, Warnings, error) {
request, err := client.newHTTPRequest(requestOptions{
RequestName: internal.GetRouteRequest,
URIParams: Params{"route_guid": guid},
})
if err != nil {
return Route{}, nil, err
}
var route Route
response := cloudcontroller.Response{
... | go | func (client *Client) GetRoute(guid string) (Route, Warnings, error) {
request, err := client.newHTTPRequest(requestOptions{
RequestName: internal.GetRouteRequest,
URIParams: Params{"route_guid": guid},
})
if err != nil {
return Route{}, nil, err
}
var route Route
response := cloudcontroller.Response{
... | [
"func",
"(",
"client",
"*",
"Client",
")",
"GetRoute",
"(",
"guid",
"string",
")",
"(",
"Route",
",",
"Warnings",
",",
"error",
")",
"{",
"request",
",",
"err",
":=",
"client",
".",
"newHTTPRequest",
"(",
"requestOptions",
"{",
"RequestName",
":",
"inter... | // GetRoute returns a route with the provided guid. | [
"GetRoute",
"returns",
"a",
"route",
"with",
"the",
"provided",
"guid",
"."
] | 5010c000047f246b870475e2c299556078cdad30 | https://github.com/cloudfoundry/cli/blob/5010c000047f246b870475e2c299556078cdad30/api/cloudcontroller/ccv2/route.go#L208-L224 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.