Skip to content

Commit d7d584f

Browse files
committed
add copyright headers
1 parent 03f848b commit d7d584f

24 files changed

+115
-2
lines changed

authorizer.go

+4
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
2+
// Copyright (c) 2019 Titanous, daeMOn63 and Contributors to the Eclipse Foundation.
3+
// SPDX-License-Identifier: Apache-2.0
4+
15
package biscuit
26

37
import (

authorizer_test.go

+4
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
2+
// Copyright (c) 2019 Titanous, daeMOn63 and Contributors to the Eclipse Foundation.
3+
// SPDX-License-Identifier: Apache-2.0
4+
15
package biscuit
26

37
import (

biscuit.go

+4
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
2+
// Copyright (c) 2019 Titanous, daeMOn63 and Contributors to the Eclipse Foundation.
3+
// SPDX-License-Identifier: Apache-2.0
4+
15
package biscuit
26

37
import (

biscuit_test.go

+4
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
2+
// Copyright (c) 2019 Titanous, daeMOn63 and Contributors to the Eclipse Foundation.
3+
// SPDX-License-Identifier: Apache-2.0
4+
15
package biscuit
26

37
import (

builder.go

+4
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
2+
// Copyright (c) 2019 Titanous, daeMOn63 and Contributors to the Eclipse Foundation.
3+
// SPDX-License-Identifier: Apache-2.0
4+
15
package biscuit
26

37
import (

converters.go

+4
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
2+
// Copyright (c) 2019 Titanous, daeMOn63 and Contributors to the Eclipse Foundation.
3+
// SPDX-License-Identifier: Apache-2.0
4+
15
package biscuit
26

37
import (

converters_v2.go

+4
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
2+
// Copyright (c) 2019 Titanous, daeMOn63 and Contributors to the Eclipse Foundation.
3+
// SPDX-License-Identifier: Apache-2.0
4+
15
package biscuit
26

37
import (

converters_v2_test.go

+4
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
2+
// Copyright (c) 2019 Titanous, daeMOn63 and Contributors to the Eclipse Foundation.
3+
// SPDX-License-Identifier: Apache-2.0
4+
15
package biscuit
26

37
import (

datalog/datalog.go

+4
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
2+
// Copyright (c) 2019 Titanous, daeMOn63 and Contributors to the Eclipse Foundation.
3+
// SPDX-License-Identifier: Apache-2.0
4+
15
package datalog
26

37
import (

datalog/datalog_test.go

+4
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
2+
// Copyright (c) 2019 Titanous, daeMOn63 and Contributors to the Eclipse Foundation.
3+
// SPDX-License-Identifier: Apache-2.0
4+
15
package datalog
26

37
import (

datalog/expressions.go

+4
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
2+
// Copyright (c) 2019 Titanous, daeMOn63 and Contributors to the Eclipse Foundation.
3+
// SPDX-License-Identifier: Apache-2.0
4+
15
package datalog
26

37
import (

datalog/expressions_test.go

+4
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
2+
// Copyright (c) 2019 Titanous, daeMOn63 and Contributors to the Eclipse Foundation.
3+
// SPDX-License-Identifier: Apache-2.0
4+
15
package datalog
26

37
import (

datalog/symbol.go

+4
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
2+
// Copyright (c) 2019 Titanous, daeMOn63 and Contributors to the Eclipse Foundation.
3+
// SPDX-License-Identifier: Apache-2.0
4+
15
package datalog
26

37
import (

example_test.go

+23-2
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
2+
// Copyright (c) 2019 Titanous, daeMOn63 and Contributors to the Eclipse Foundation.
3+
// SPDX-License-Identifier: Apache-2.0
4+
15
package biscuit_test
26

37
import (
@@ -14,6 +18,7 @@ func ExampleBiscuit() {
1418
publicRoot, privateRoot, _ := ed25519.GenerateKey(rng)
1519

1620
authority, err := parser.FromStringBlockWithParams(`
21+
user(1234);
1722
right("/a/file1.txt", {read});
1823
right("/a/file1.txt", {write});
1924
right("/a/file2.txt", {read});
@@ -88,6 +93,22 @@ func ExampleBiscuit() {
8893
}
8994
v1.AddAuthorizer(authorizer)
9095

96+
query, err := parser.FromStringRule(`data($r) <- resource($r)`)
97+
if err != nil {
98+
panic(fmt.Errorf("failed to parse rule: %v", err))
99+
}
100+
101+
results, err := v1.Query(query)
102+
103+
if err != nil {
104+
panic(fmt.Errorf("failed to query authorizer: %v", err))
105+
}
106+
107+
for _, r := range results {
108+
fmt.Println(r.Name)
109+
fmt.Println(r.IDs[0].String())
110+
}
111+
91112
if err := v1.Authorize(); err != nil {
92113
// fmt.Println(v1.PrintWorld())
93114

@@ -117,8 +138,8 @@ func ExampleBiscuit() {
117138
fmt.Println("allowed to write /a/file1.txt")
118139
}
119140

120-
// Output: Token1 length: 251
121-
// Token2 length: 433
141+
// Output: Token1 length: 262
142+
// Token2 length: 444
122143
// allowed to read /a/file1.txt
123144
// forbidden to write /a/file1.txt
124145
}

experiments/pop_test.go

+4
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
2+
// Copyright (c) 2019 Titanous, daeMOn63 and Contributors to the Eclipse Foundation.
3+
// SPDX-License-Identifier: Apache-2.0
4+
15
package experiments
26

37
/*

options.go

+4
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
2+
// Copyright (c) 2019 Titanous, daeMOn63 and Contributors to the Eclipse Foundation.
3+
// SPDX-License-Identifier: Apache-2.0
4+
15
package biscuit
26

37
import "io"

parser/grammar.go

+4
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
2+
// Copyright (c) 2019 Titanous, daeMOn63 and Contributors to the Eclipse Foundation.
3+
// SPDX-License-Identifier: Apache-2.0
4+
15
package parser
26

37
import (

parser/grammar_test.go

+4
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
2+
// Copyright (c) 2019 Titanous, daeMOn63 and Contributors to the Eclipse Foundation.
3+
// SPDX-License-Identifier: Apache-2.0
4+
15
package parser
26

37
import (

parser/parser.go

+4
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
2+
// Copyright (c) 2019 Titanous, daeMOn63 and Contributors to the Eclipse Foundation.
3+
// SPDX-License-Identifier: Apache-2.0
4+
15
package parser
26

37
import (

parser/parser_test.go

+4
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
2+
// Copyright (c) 2019 Titanous, daeMOn63 and Contributors to the Eclipse Foundation.
3+
// SPDX-License-Identifier: Apache-2.0
4+
15
package parser
26

37
import (

samples/samples_test.go

+4
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
2+
// Copyright (c) 2019 Titanous, daeMOn63 and Contributors to the Eclipse Foundation.
3+
// SPDX-License-Identifier: Apache-2.0
4+
15
package biscuittest
26

37
import (

types.go

+4
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
2+
// Copyright (c) 2019 Titanous, daeMOn63 and Contributors to the Eclipse Foundation.
3+
// SPDX-License-Identifier: Apache-2.0
4+
15
package biscuit
26

37
import (

types_test.go

+4
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
2+
// Copyright (c) 2019 Titanous, daeMOn63 and Contributors to the Eclipse Foundation.
3+
// SPDX-License-Identifier: Apache-2.0
4+
15
package biscuit
26

37
import (

website_test.go

+4
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
2+
// Copyright (c) 2019 Titanous, daeMOn63 and Contributors to the Eclipse Foundation.
3+
// SPDX-License-Identifier: Apache-2.0
4+
15
package biscuit_test
26

37
import (

0 commit comments

Comments
 (0)