Documentation
¶
Index ¶
- func Inspect(value rules.Check) (BaselineStore, Metric, float64, tokenizer.Tokenizer, bool)
- func Members() []rules.Member
- func Register(reg *rules.Registry)
- func Reset(ctx context.Context, store BaselineStore, p string, content []byte, ...) (Baseline, Baseline, error)
- type Baseline
- type BaselineStore
- type Metric
- type Rule
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Baseline ¶
type Baseline struct {
Path string `json:"path,omitempty"`
At time.Time `json:"ts"`
Op string `json:"op"`
Reason string `json:"reason,omitempty"`
Actor string `json:"actor,omitempty"`
Note string `json:"note,omitempty"`
Commit string `json:"commit,omitempty"`
Kilobytes int `json:"kilobytes"`
Lines int `json:"lines"`
Tokens int `json:"tokens"`
Tokenizer string `json:"tokenizer,omitempty"`
}
type BaselineStore ¶
type BaselineStore interface {
Get(context.Context, string) (Baseline, bool, error)
History(context.Context, string) ([]Baseline, error)
Record(context.Context, Baseline) error
Clear(context.Context, string, string) error
Move(context.Context, string, string) error
}
func NewBaselineStore ¶
func NewBaselineStore(state packagestate.Store) BaselineStore
Click to show internal directories.
Click to hide internal directories.