policy

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Mar 11, 2024 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type NewGeneratedExamplePolicyRequest

type NewGeneratedExamplePolicyRequest struct {
	ServiceName       string
	ServiceWebsite    string
	ServiceEmail      string
	LegalBusinessName string
}

NewGeneratedExamplePolicyRequest holds the items needed to generate a new policy

type PolicySection

type PolicySection struct {
	Header          string
	HeaderId        string
	HeaderWithIndex bool
	Paragraphs      []template.HTML
}

PolicySection respresents the components needed to create a section in a policy

type TableOfContentsItem

type TableOfContentsItem struct {
	HeaderHref  string
	HeaderTitle string
}

TableOfContentsItem is the header and its corresponding href reference (internal link)

type WebAppPolicy

type WebAppPolicy struct {
	Name                 string
	LastUpdated          string
	Sections             []PolicySection
	TableOfContentsItems []TableOfContentsItem
}

WebAppPolicy represents the elements needed to construct a valid policy on the web app

func NewGeneratedExamplePolicy

func NewGeneratedExamplePolicy(r *NewGeneratedExamplePolicyRequest) *WebAppPolicy

NewGeneratedExamplePolicy creates a new example web app policy

func (*WebAppPolicy) GetTableOfContentsItems

func (w *WebAppPolicy) GetTableOfContentsItems() []TableOfContentsItem

GetTableOfContentsItems handles looping over the sections provided and pulling out the headers to create the respective splice of headers and corresponding href references

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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