summaryrefslogtreecommitdiff
path: root/modules/caddyhttp/celmatcher.go
diff options
context:
space:
mode:
authorJacob Gadikian <jacobgadikian@gmail.com>2023-08-08 03:40:31 +0800
committerGitHub <noreply@github.com>2023-08-07 19:40:31 +0000
commitb32f265ecad60404c3818cc9d42e367a8e4eb7d4 (patch)
tree16d79c3ad7ddf0cc6f7915d1e47bdd6d269bf8d5 /modules/caddyhttp/celmatcher.go
parent431adc09805972196314b2b188904942cbe5dfee (diff)
ci: Use gofumpt to format code (#5707)
Diffstat (limited to 'modules/caddyhttp/celmatcher.go')
-rw-r--r--modules/caddyhttp/celmatcher.go4
1 files changed, 4 insertions, 0 deletions
diff --git a/modules/caddyhttp/celmatcher.go b/modules/caddyhttp/celmatcher.go
index cc87146..1ba61a0 100644
--- a/modules/caddyhttp/celmatcher.go
+++ b/modules/caddyhttp/celmatcher.go
@@ -234,9 +234,11 @@ func (cr celHTTPRequest) Parent() interpreter.Activation {
func (cr celHTTPRequest) ConvertToNative(typeDesc reflect.Type) (any, error) {
return cr.Request, nil
}
+
func (celHTTPRequest) ConvertToType(typeVal ref.Type) ref.Val {
panic("not implemented")
}
+
func (cr celHTTPRequest) Equal(other ref.Val) ref.Val {
if o, ok := other.Value().(celHTTPRequest); ok {
return types.Bool(o.Request == cr.Request)
@@ -255,12 +257,14 @@ type celPkixName struct{ *pkix.Name }
func (pn celPkixName) ConvertToNative(typeDesc reflect.Type) (any, error) {
return pn.Name, nil
}
+
func (pn celPkixName) ConvertToType(typeVal ref.Type) ref.Val {
if typeVal.TypeName() == "string" {
return types.String(pn.Name.String())
}
panic("not implemented")
}
+
func (pn celPkixName) Equal(other ref.Val) ref.Val {
if o, ok := other.Value().(string); ok {
return types.Bool(pn.Name.String() == o)