-
Notifications
You must be signed in to change notification settings - Fork 1
/
waf_dl_unsupported.go
58 lines (43 loc) · 1.46 KB
/
waf_dl_unsupported.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
// Unless explicitly stated otherwise all files in this repository are licensed
// under the Apache License Version 2.0.
// This product includes software developed at Datadog (https://www.datadoghq.com/).
// Copyright 2016-present Datadog, Inc.
// Build when the target OS or architecture are not supported
//go:build (!linux && !darwin) || (!amd64 && !arm64) || go1.22
package waf
type wafDl struct{}
func newWafDl() (dl *wafDl, err error) {
return nil, unsupportedTargetErr
}
func (waf *wafDl) wafGetVersion() string {
return ""
}
func (waf *wafDl) wafInit(obj *wafObject, config *wafConfig, info *wafRulesetInfo) wafHandle {
return 0
}
func (waf *wafDl) wafUpdate(handle wafHandle, ruleset *wafObject, info *wafRulesetInfo) wafHandle {
return 0
}
func (waf *wafDl) wafRulesetInfoFree(info *wafRulesetInfo) {
}
func (waf *wafDl) wafDestroy(handle wafHandle) {
}
func (waf *wafDl) wafRequiredAddresses(handle wafHandle) []string {
return nil
}
func (waf *wafDl) wafContextInit(handle wafHandle) wafContext {
return 0
}
func (waf *wafDl) wafContextDestroy(context wafContext) {
}
func (waf *wafDl) wafResultFree(result *wafResult) {
}
func (waf *wafDl) wafRun(context wafContext, obj *wafObject, result *wafResult, timeout uint64) wafReturnCode {
return wafErrInternal
}
// Implement SupportsTarget()
func supportsTarget() (bool, error) {
// TODO: provide finer-grained unsupported target error message giving the
// exact reason why
return false, unsupportedTargetErr
}