• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

mendersoftware / deviceauth / 1507843008

13 Sep 2024 11:01AM UTC coverage: 81.326%. Remained the same
1507843008

push

gitlab-ci

web-flow
Merge pull request #727 from mzedel/chore/deprecate

Chore/deprecate

4834 of 5944 relevant lines covered (81.33%)

42.77 hits per line

Source File
Press 'n' to go to next uncovered line, 'b' for previous

100.0
/access/checker.go
1
// Copyright 2021 Northern.tech AS
2
//
3
//    Licensed under the Apache License, Version 2.0 (the "License");
4
//    you may not use this file except in compliance with the License.
5
//    You may obtain a copy of the License at
6
//
7
//        http://www.apache.org/licenses/LICENSE-2.0
8
//
9
//    Unless required by applicable law or agreed to in writing, software
10
//    distributed under the License is distributed on an "AS IS" BASIS,
11
//    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12
//    See the License for the specific language governing permissions and
13
//    limitations under the License.
14

15
package access
16

17
import "context"
18

19
type Checker interface {
20
        ValidateWithContext(ctx context.Context) error
21
}
22

23
type checks []Checker
24

25
func (cs checks) ValidateWithContext(ctx context.Context) error {
6✔
26
        for _, c := range cs {
11✔
27
                err := c.ValidateWithContext(ctx)
5✔
28
                if err != nil {
8✔
29
                        return err
3✔
30
                }
3✔
31
        }
32
        return nil
3✔
33
}
34

35
func Merge(checkers ...Checker) Checker {
6✔
36
        return checks(checkers)
6✔
37
}
6✔
38

39
type PermissionError struct {
40
        error
41
}
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2025 Coveralls, Inc