stats

package
v0.33.30 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Dec 3, 2026 License: Apache-2.0 Imports: 1 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ObjectType

type ObjectType struct {
	ObjCount  int32     `json:"_obj_count,omitempty"`
	Count     int32     `json:"_count,omitempty"`
	Relations Relations `json:"relations,omitempty"`
}

type ObjectTypes

type ObjectTypes map[model.ObjectName]*ObjectType

type Relation

type Relation struct {
	Count        int32        `json:"_count,omitempty"`
	SubjectTypes SubjectTypes `json:"subject_types,omitempty"`
}

type Relations

type Relations map[model.RelationName]*Relation

type Stats

type Stats struct {
	ObjectTypes ObjectTypes `json:"object_types,omitempty"`
}

func NewStats

func NewStats() *Stats

func (*Stats) ObjectRefCount

func (s *Stats) ObjectRefCount(on model.ObjectName) int32

func (*Stats) RelationRefCount

func (s *Stats) RelationRefCount(on model.ObjectName, rn model.RelationName) int32

func (*Stats) RelationSubjectCount

func (s *Stats) RelationSubjectCount(on model.ObjectName, rn model.RelationName, sn model.ObjectName, sr model.RelationName) int32

type SubjectRelation

type SubjectRelation struct {
	Count int32 `json:"_count,omitempty"`
}

type SubjectRelations

type SubjectRelations map[model.RelationName]*SubjectRelation

type SubjectType

type SubjectType struct {
	Count            int32            `json:"_count,omitempty"`
	SubjectRelations SubjectRelations `json:"subject_relations,omitempty"`
}

type SubjectTypes

type SubjectTypes map[model.ObjectName]*SubjectType

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL