db

package
v0.0.0-...-12e7086 Latest Latest
Warning

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

Go to latest
Published: Jan 8, 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 Document

type Document struct {
	Name         string
	SecurityCode string
	Content      string
}

type Documents

type Documents struct {
	// contains filtered or unexported fields
}

func NewDocuments

func NewDocuments(seedPath string) (*Documents, error)

Loads a new SQLITE3 database connection, and resets the database context with the seed data. This database is only intended to be read from by the documents service, and is intended to exactly mirror the contents of the seed data. This is the database students will execute SQL injections against.

func (*Documents) QueryAll

func (d *Documents) QueryAll() ([]Document, error)

func (*Documents) UnsafeQuery

func (d *Documents) UnsafeQuery(query string) ([]Document, error)

Jump to

Keyboard shortcuts

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