Skip to content

Commit

Permalink
improve wildcard godoc
Browse files Browse the repository at this point in the history
  • Loading branch information
miparnisari committed Jan 7, 2025
1 parent 3097a74 commit 5c1850e
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions pkg/go/graph/weighted_graph_edge.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ type WeightedAuthorizationModelEdge struct {
conditionedOn string
from *WeightedAuthorizationModelNode
to *WeightedAuthorizationModelNode
wildcards []string
wildcards []string // e.g. "user". This means that in the direction of this edge there is a path to node user:*
}

// GetWeights returns the entire weights map.
Expand Down Expand Up @@ -40,7 +40,7 @@ func (edge *WeightedAuthorizationModelEdge) GetTo() *WeightedAuthorizationModelN
return edge.to
}

// GetWildcards returns an array of types.
// GetWildcards returns an array of types, e.g. "user". This means that in the direction of this edge there is a path to node user:*
func (edge *WeightedAuthorizationModelEdge) GetWildcards() []string {
return edge.wildcards
}
4 changes: 2 additions & 2 deletions pkg/go/graph/weighted_graph_node.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ type WeightedAuthorizationModelNode struct {
nodeType NodeType
label string // e.g. "group#member", UnionOperator, IntersectionOperator, ExclusionOperator
uniqueLabel string // e.g. "group#member", or "union:01JH0MR4H1MBFGVN37E4PRMPM3"
wildcards []string // e.g. "user"
wildcards []string // e.g. "user". This means that from this node there is a path to node user:*
}

// GetWeights returns the entire weights map.
Expand Down Expand Up @@ -35,7 +35,7 @@ func (node *WeightedAuthorizationModelNode) GetUniqueLabel() string {
return node.uniqueLabel
}

// GetWildcards returns an array of types.
// GetWildcards returns an array of types, e.g. "user". This means that from this node there is a path to node user:*
func (node *WeightedAuthorizationModelNode) GetWildcards() []string {
return node.wildcards
}

0 comments on commit 5c1850e

Please sign in to comment.