func()

in lib/http.go [345:475]


func (l httpLib) CompileOptions() []cel.EnvOption {
	return []cel.EnvOption{
		cel.Function("head",
			cel.Overload(
				"head_string",
				[]*cel.Type{cel.StringType},
				mapStringDyn,
				cel.UnaryBinding(catch(l.doHead)),
			),
		),

		cel.Function("get",
			cel.Overload(
				"get_string",
				[]*cel.Type{cel.StringType},
				mapStringDyn,
				cel.UnaryBinding(catch(l.doGet)),
			),
		),
		cel.Function("get_request",
			cel.Overload(
				"get_request_string",
				[]*cel.Type{cel.StringType},
				mapStringDyn,
				cel.UnaryBinding(catch(l.newGetRequest)),
			),
		),

		cel.Function("post",
			cel.Overload(
				"post_string_string_bytes",
				[]*cel.Type{cel.StringType, cel.StringType, cel.BytesType},
				mapStringDyn,
				cel.FunctionBinding(catch(l.doPost)),
			),
			cel.Overload(
				"post_string_string_string",
				[]*cel.Type{cel.StringType, cel.StringType, cel.StringType},
				mapStringDyn,
				cel.FunctionBinding(catch(l.doPost)),
			),
		),
		cel.Function("post_request",
			cel.Overload(
				"post_request_string_string_bytes",
				[]*cel.Type{cel.StringType, cel.StringType, cel.BytesType},
				mapStringDyn,
				cel.FunctionBinding(catch(l.newPostRequest)),
			),
			cel.Overload(
				"post_request_string_string_string",
				[]*cel.Type{cel.StringType, cel.StringType, cel.StringType},
				mapStringDyn,
				cel.FunctionBinding(catch(l.newPostRequest)),
			),
		),

		cel.Function("request",
			cel.Overload(
				"request_string_string",
				[]*cel.Type{cel.StringType, cel.StringType},
				mapStringDyn,
				cel.BinaryBinding(catch(l.newRequest)),
			),
			cel.Overload(
				"request_string_string_bytes",
				[]*cel.Type{cel.StringType, cel.StringType, cel.BytesType},
				mapStringDyn,
				cel.FunctionBinding(catch(l.newRequestBody)),
			),
			cel.Overload(
				"request_string_string_string",
				[]*cel.Type{cel.StringType, cel.StringType, cel.StringType},
				mapStringDyn,
				cel.FunctionBinding(catch(l.newRequestBody)),
			),
		),

		cel.Function("do_request",
			cel.MemberOverload(
				"map_do_request",
				[]*cel.Type{mapStringDyn},
				mapStringDyn,
				cel.UnaryBinding(catch(l.doRequest)),
			),
		),

		cel.Function("basic_authentication",
			cel.MemberOverload(
				"map_basic_authentication_string_string",
				[]*cel.Type{mapStringDyn, cel.StringType, cel.StringType},
				mapStringDyn,
				cel.FunctionBinding(catch(l.basicAuthentication)),
			),
		),

		cel.Function("parse_url",
			cel.MemberOverload(
				"string_parse_url",
				[]*cel.Type{cel.StringType},
				mapStringDyn,
				cel.UnaryBinding(catch(parseURL)),
			),
		),
		cel.Function("format_url",
			cel.MemberOverload(
				"map_format_url",
				[]*cel.Type{mapStringDyn},
				cel.StringType,
				cel.UnaryBinding(catch(formatURL)),
			),
		),

		cel.Function("parse_query",
			cel.MemberOverload(
				"string_parse_query",
				[]*cel.Type{cel.StringType},
				mapStringDyn,
				cel.UnaryBinding(catch(parseQuery)),
			),
		),
		cel.Function("format_query",
			cel.MemberOverload(
				"map_format_query",
				[]*cel.Type{mapStringDyn},
				cel.StringType,
				cel.UnaryBinding(catch(formatQuery)),
			),
		),
	}
}