Documentation ¶
Overview ¶
Package model defines the comply data model.
Markdown Wrappers ¶
The model package treats typed markdown files as model objects. All wrapped markdown documents are assumed to have a YAML header and a markdown body separated by three dashes: "---".
Local Ticket Cache ¶
Tickets are defined externally (in the configured ticketing system), and cached locally for rapid dashboard rendering.
Index ¶
- Constants
- func ControlsSatisfied(data *Data) map[string][]string
- func DB() *scribble.Driver
- func Register(ts TicketSystem, plugin TicketPlugin)
- type Audit
- type Control
- type Data
- type Document
- type Procedure
- type Revision
- type Satisfaction
- type Standard
- type Ticket
- type TicketLinks
- type TicketPlugin
- type TicketState
- type TicketSystem
Constants ¶
const ( // Jira from Atlassian. Jira = TicketSystem(config.Jira) // GitHub from GitHub. GitHub = TicketSystem(config.GitHub) // GitLab from GitLab. GitLab = TicketSystem(config.GitLab) // NoTickets indicates no ticketing system integration. NoTickets = TicketSystem(config.NoTickets) )
const ( Open = TicketState("open") Closed = TicketState("closed") )
Variables ¶
This section is empty.
Functions ¶
func ControlsSatisfied ¶
ControlsSatisfied determines the unique controls currently satisfied by all Narratives, Policies, and Procedures
func DB ¶
func DB() *scribble.Driver
DB provides a singleton reference to a local json cache; will panic if storage location is not writeable.
func Register ¶
func Register(ts TicketSystem, plugin TicketPlugin)
Register ticketing system plugin.
Types ¶
type Data ¶
type Document ¶ added in v1.2.1
type Document struct { Name string `yaml:"name"` Acronym string `yaml:"acronym"` Revisions []Revision `yaml:"majorRevisions"` Satisfies Satisfaction `yaml:"satisfies"` FullPath string OutputFilename string ModifiedAt time.Time Body string }
func ReadNarratives ¶
ReadNarratives loads narrative descriptions from the filesystem.
func ReadPolicies ¶
ReadPolicies loads policy documents from the filesystem.
type Procedure ¶
type Procedure struct { Name string `yaml:"name"` ID string `yaml:"id"` Cron string `yaml:"cron"` Revisions []Revision `yaml:"majorRevisions"` Satisfies Satisfaction `yaml:"satisfies"` FullPath string OutputFilename string ModifiedAt time.Time Body string }
func ReadProcedures ¶
ReadProcedures loads procedure descriptions from the filesystem.
type Satisfaction ¶
type Standard ¶
func ReadStandards ¶
ReadStandards loads standard definitions from the filesystem.
type Ticket ¶
type Ticket struct { ID string Name string State TicketState Body string Attributes map[string]interface{} ClosedAt *time.Time CreatedAt *time.Time UpdatedAt *time.Time }
func ReadTickets ¶
ReadTickets returns all known tickets, or an empty list in the event the ticket cache is empty or unavailable.
func (*Ticket) ProcedureID ¶
type TicketLinks ¶ added in v1.1.16
type TicketPlugin ¶
type TicketPlugin interface { Get(ID string) (*Ticket, error) FindOpen() ([]*Ticket, error) FindByTag(name, value string) ([]*Ticket, error) FindByTagName(name string) ([]*Ticket, error) Create(ticket *Ticket, labels []string) error Configure(map[string]interface{}) error Prompts() map[string]string Links() TicketLinks LinkFor(ticket *Ticket) string Configured() bool }
TicketPlugin models support for ticketing systems.
func GetPlugin ¶
func GetPlugin(ts TicketSystem) TicketPlugin
GetPlugin loads the ticketing database.
type TicketState ¶
type TicketState string