Skip to content
Snippets Groups Projects
Commit 7e519112 authored by Yordan Kinkov's avatar Yordan Kinkov
Browse files

Add taskList template documentation for new policy parameter

parent 5bd23e58
No related branches found
No related tags found
No related merge requests found
......@@ -14,7 +14,7 @@ linters:
- golangci-lint run
unit tests:
image: golang:1.21.3
image: golang:1.21.4
stage: test
script:
- go version
......@@ -23,7 +23,7 @@ unit tests:
coverage: '/total:\s+\(statements\)\s+(\d+.\d+\%)/'
govulncheck:
image: golang:1.21.3
image: golang:1.21.4
stage: test
script:
- go version
......
FROM golang:1.21.3-alpine3.17 as builder
FROM golang:1.21.4-alpine3.17 as builder
RUN apk add git
......
FROM golang:1.21.3
FROM golang:1.21.4
RUN go install github.com/ysmood/kit/cmd/guard@v0.25.11
......
......@@ -13,7 +13,7 @@ an example of task template definition:
"name":"exampleTask",
"url":"https://jsonplaceholder.typicode.com/todos/1",
"method":"GET",
"requestPolicy":"example/example/1.0",
"requestPolicy":"policies/example/example/1.0",
"responsePolicy":"",
"finalPolicy":"",
"cacheNamespace":"login",
......
......@@ -25,8 +25,8 @@ func New(addr string, httpClient *http.Client) *Client {
// Evaluate calls the policy service to execute the given policy.
// The policy is expected as a string path uniquely identifying the
// policy that has to be evaluated. For example, with policy = `xfsc/didResolve/1.0`,
// the client will do HTTP request to http://policyhost/policy/xfsc/didResolve/1.0/evaluation.
// policy that has to be evaluated. For example, with policy = `policies/xfsc/didResolve/1.0`,
// the client will do HTTP request to http://policyhost/policy/policies/xfsc/didResolve/1.0/evaluation.
func (c *Client) Evaluate(ctx context.Context, policy string, data []byte) ([]byte, error) {
uri := c.addr + "/policy/" + policy + "/evaluation"
policyURL, err := url.ParseRequestURI(uri)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment