package
Version:
v1.0.0
Opens a new window with list of versions in this module.
Published: Jul 30, 2026
License: AGPL-3.0
Opens a new window with license information.
Imports: 1
Opens a new window with list of imports.
Imported by: 0
Opens a new window with list of known importers.
Documentation
¶
type CompiledRuleTuple struct {
UserResourceType string
Permission string
ObjectResourceType string
ObjectResourceId string
}
RegexMatches maps named capture group identifiers to their captured values.
type RuleTuple struct {
Id string `json:"id"`
RuleId string `json:"rule_id"`
UserResourceType string `json:"user_resource_type"`
Permission string `json:"permission"`
ObjectResourceType string `json:"object_resource_type"`
ObjectResourceId string `json:"object_resource_id"`
}
type RuleWithTuples struct {
Id string `json:"id"`
ServiceId string `json:"service_id"`
ServiceSlug string `json:"service_slug"`
Method string `json:"method"`
SegmentCount int `json:"segment_count"`
StaticPrefix string `json:"static_prefix"`
PathRegex string `json:"path_regex"`
Priority int `json:"priority"`
Tenant *string `json:"tenant"`
Revision string `json:"revision"`
RuleTuples []*RuleTuple `json:"rule_tuples"`
}
type SeedFile struct {
Version string `yaml:"version"`
Service string `yaml:"service"`
Revision string `yaml:"revision"`
Description string `yaml:"description"`
Rules []SeedRule `yaml:"rules"`
FilePath string `yaml:"-"`
}
type SeedRule struct {
Method string `yaml:"method"`
Match string `yaml:"match"`
Priority int `yaml:"priority"`
Tuples []SeedTuple `yaml:"tuples"`
}
type SeedTuple struct {
UserResourceType string `yaml:"userResourceType"`
Permission string `yaml:"permission"`
ObjectResourceType string `yaml:"objectResourceType"`
ObjectResourceId string `yaml:"objectResourceId"`
}
UnmarshalYAML implements custom unmarshaling to support both camelCase and snake_case keys in YAML files.
Source Files
¶
Click to show internal directories.
Click to hide internal directories.