cmd/sidecar/api_v2_clients.go
Function getReferencedFile
has 9 return statements (exceeds 4 allowed). Open
Open
func getReferencedFile(ctx context.Context, flowToken, flowAddr, namespace string, path string) ([]byte, int, error) {
addr := fmt.Sprintf("http://%v/api/v2/namespaces/%v/files/%v", flowAddr, namespace, path)
var d []byte
resp, err := doRequest(ctx, http.MethodGet, flowToken, addr, nil)
Function patchVarData
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
func patchVarData(ctx context.Context, flowToken string, flowAddr string, namespace string, id string, body datastore.RuntimeVariablePatch) (int, error) {
Function getVariableMetaFromFlow
has 6 return statements (exceeds 4 allowed). Open
Open
func getVariableMetaFromFlow(ctx context.Context, flowToken string, flowAddr string, ir *functionRequest, scope, key string) (variable, int, error) {
var varResp *variablesResponse
var err error
var typ string
statusCode := http.StatusOK
Function getVariableDataViaID
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
func getVariableDataViaID(ctx context.Context, flowToken string, flowAddr string, namespace string, id string) (variable, error) {
Function getVariableMetaFromFlow
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
func getVariableMetaFromFlow(ctx context.Context, flowToken string, flowAddr string, ir *functionRequest, scope, key string) (variable, int, error) {
Function postVarData
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
func postVarData(ctx context.Context, flowToken string, flowAddr string, namespace string, body createVarRequest) (int, error) {
Function getVariables
has 5 return statements (exceeds 4 allowed). Open
Open
func getVariables(ctx context.Context, flowToken, addr string) (*variablesResponse, int, error) {
resp, err := doRequest(ctx, http.MethodGet, flowToken, addr, nil)
if err != nil {
return nil, resp.StatusCode, err
}
Function getVariableDataViaID
has 5 return statements (exceeds 4 allowed). Open
Open
func getVariableDataViaID(ctx context.Context, flowToken string, flowAddr string, namespace string, id string) (variable, error) {
addr := fmt.Sprintf("http://%v/api/v2/namespaces/%v/variables/%v", flowAddr, namespace, id)
client := &http.Client{}
req, err := http.NewRequestWithContext(ctx, http.MethodGet, addr, nil)
if err != nil {
Function handleResponse
has 5 return statements (exceeds 4 allowed). Open
Open
func handleResponse(resp *http.Response, next func(resp *http.Response) (int, error)) (int, error) {
defer resp.Body.Close()
if resp.StatusCode != http.StatusOK {
var apiErrorResp apiError