Documentation ¶
Index ¶
- Constants
- Variables
- func AddAttribute(a model.Attribute) (err error)
- func AddAttributes(as []model.Attribute, wg *sync.WaitGroup, errChan chan error)
- func AddCategory(c model.Category) (err error)
- func AddCoordinates(cs []model.Coordinate, wg *sync.WaitGroup, errChan chan error)
- func AddDisclosed(d model.Disclosed) (err error)
- func AddDiscloseds(ds []model.Disclosed, wg *sync.WaitGroup, errChan chan error)
- func AddDisclosure(d model.Disclosure) (err error)
- func AddDisclosures(ds []model.Disclosure, wg *sync.WaitGroup, errChan chan error)
- func AddDownstream(d model.Downstream) (err error)
- func AddDownstreams(ds []model.Downstream, wg *sync.WaitGroup, errChan chan error)
- func AddOrganization(o model.Organization) (err error)
- func Close() (err error)
- func GetAttribute(id string) (a *model.Attribute, err error)
- func GetAttributeIDs() (IDs []string, err error)
- func GetAttributeIDsToOrg(org string) (IDs []string, err error)
- func GetAttributeTypeIDs() (IDs []string, err error)
- func GetAttributeTypeIDsToOrg(org string) (IDs []string, err error)
- func GetAttributeTypeValues(thetype string) (values []string, err error)
- func GetAttributeTypeValuesToOrg(org string, thetype string) (values []string, err error)
- func GetCategory(id string) (c []model.Category, err error)
- func GetCoordinates(neLat, neLng, swLat, swLng string) (reply []model.Coordinate, err error)
- func GetDisclosed(id string) (d *model.Disclosed, err error)
- func GetDisclosure(id string) (d *model.Disclosure, err error)
- func GetDisclosureIDs() (IDs []string, err error)
- func GetDisclosureIDsChrono() (IDs []string, err error)
- func GetDisclosureIDsToOrg(org string) (IDs []string, err error)
- func GetDisclosureIDsToOrgChrono(org string) (IDs []string, err error)
- func GetDownstreamDisclosureIDs(id string) (IDs []string, err error)
- func GetDownstreamDisclosureIDsChrono(id string) (IDs []string, err error)
- func GetExplicitDisclosureIDsToOrg(org string) (IDs []string, err error)
- func GetExplicitlyDisclosedAttributeIDs() (IDs []string, err error)
- func GetExplicitlyDisclosedAttributeIDsToOrg(org string) (IDs []string, err error)
- func GetExplicitlyDisclosedAttributeTypeIDs() (IDs []string, err error)
- func GetExplicitlyDisclosedAttributeTypeIDsToOrg(org string) (IDs []string, err error)
- func GetExplicitlyDisclosedAttributeTypeValues(thetype string) (values []string, err error)
- func GetExplicitlyDisclosedAttributeTypeValuesToOrg(org string, thetype string) (values []string, err error)
- func GetImplicitDisclosureIDs(id string) (IDs []string, err error)
- func GetImplicitDisclosureIDsChrono(id string) (IDs []string, err error)
- func GetImplicitlyDisclosedAttributeIDs() (IDs []string, err error)
- func GetImplicitlyDisclosedAttributeIDsToOrg(org string) (IDs []string, err error)
- func GetImplicitlyDisclosedAttributeTypeIDs() (IDs []string, err error)
- func GetImplicitlyDisclosedAttributeTypeIDsToOrg(org string) (IDs []string, err error)
- func GetImplicitlyDisclosedAttributeTypeValues(thetype string) (values []string, err error)
- func GetImplicitlyDisclosedAttributeTypeValuesToOrg(org, thetype string) (values []string, err error)
- func GetImplictDisclosureIDsToOrg(org string) (IDs []string, err error)
- func GetNextCoordinateChrono(id string) (exists bool, next model.Coordinate, err error)
- func GetOrganization(id string) (org *model.Organization, err error)
- func GetOrganizationIDs() (IDs []string, err error)
- func GetPrevCoordinateChrono(id string) (exists bool, prev model.Coordinate, err error)
- func GetReceivingOrgIDs(attribute string) (IDs []string, err error)
- func GetUser() (u *model.User, err error)
- func PadCoordinate(coord string) string
- func SetUser(u model.User) (err error)
- func Setup() (err error)
- func Start(file string) (err error)
Constants ¶
const NoSuchOrgError = "no such organization"
NoSuchOrgError is the error message on no such organization
const Self = "USER"
Self is the constant that represents the user disclosing something him- or herself.
Variables ¶
var DB *bolt.DB
DB is our database presumably created somewhere else.
Functions ¶
func AddAttribute ¶
AddAttribute adds an attribute to the database.
func AddAttributes ¶
AddAttributes adds many attributes at once.
func AddCategory ¶
AddCategory adds a category to the database.
func AddCoordinates ¶
func AddCoordinates(cs []model.Coordinate, wg *sync.WaitGroup, errChan chan error)
AddCoordinates adds many coordinates at once.
func AddDisclosed ¶
AddDisclosed adds that a disclosure disclosed many attributes.
func AddDiscloseds ¶
AddDiscloseds adds many disclosed at once.
func AddDisclosure ¶
func AddDisclosure(d model.Disclosure) (err error)
AddDisclosure adds a disclosure to the database.
func AddDisclosures ¶
func AddDisclosures(ds []model.Disclosure, wg *sync.WaitGroup, errChan chan error)
AddDisclosures adds many disclosures at once.
func AddDownstream ¶
func AddDownstream(d model.Downstream) (err error)
AddDownstream adds a downstream relationship.
func AddDownstreams ¶
func AddDownstreams(ds []model.Downstream, wg *sync.WaitGroup, errChan chan error)
AddDownstreams adds many downstream at once.
func AddOrganization ¶
func AddOrganization(o model.Organization) (err error)
AddOrganization adds an organization to the database.
func GetAttribute ¶
GetAttribute returns the attribute with the provided id.
func GetAttributeIDs ¶
GetAttributeIDs returns all attribute identifiers.
func GetAttributeIDsToOrg ¶
GetAttributeIDsToOrg returns all attribute IDs disclosed to an organization.
func GetAttributeTypeIDs ¶
GetAttributeTypeIDs returns all attribute type IDs.
func GetAttributeTypeIDsToOrg ¶
GetAttributeTypeIDsToOrg returns all attribute type IDs disclosed to an organization.
func GetAttributeTypeValues ¶
GetAttributeTypeValues returns all attribute values for a type.
func GetAttributeTypeValuesToOrg ¶
GetAttributeTypeValuesToOrg returns all attribute type values disclosed to an organization.
func GetCategory ¶
GetCategory returns the category with the provided identifier.
func GetCoordinates ¶
func GetCoordinates(neLat, neLng, swLat, swLng string) (reply []model.Coordinate, err error)
GetCoordinates gets the coordinates within (inclusive)
func GetDisclosed ¶
GetDisclosed gets the disclosed for a specific disclosure id.
func GetDisclosure ¶
func GetDisclosure(id string) (d *model.Disclosure, err error)
GetDisclosure returns the disclosure with the provided id.
func GetDisclosureIDs ¶
GetDisclosureIDs returns all the data disclosure IDs.
func GetDisclosureIDsChrono ¶
GetDisclosureIDsChrono returns all the data disclosure IDs sorted chronologically.
func GetDisclosureIDsToOrg ¶
GetDisclosureIDsToOrg returns all data disclosure IDs to a particular organization.
func GetDisclosureIDsToOrgChrono ¶
GetDisclosureIDsToOrgChrono returns all data disclosure IDs to a particular organization in chronological order.
func GetDownstreamDisclosureIDs ¶
GetDownstreamDisclosureIDs returns all data disclosures (their IDs) that were shared downstream with the provided data disclosure as the origin/source.
func GetDownstreamDisclosureIDsChrono ¶
GetDownstreamDisclosureIDsChrono is like GetDownstreamDisclosureIDs, but also sorts the identifiers in chronological order.
func GetExplicitDisclosureIDsToOrg ¶
GetExplicitDisclosureIDsToOrg is like GetDisclosureIDsToOrg, but explicit.
func GetExplicitlyDisclosedAttributeIDs ¶
GetExplicitlyDisclosedAttributeIDs returns all explicitly disclosed attributes.
func GetExplicitlyDisclosedAttributeIDsToOrg ¶
GetExplicitlyDisclosedAttributeIDsToOrg is like GetAttributeIDsToOrg but for explicitly disclosed attributes only.
func GetExplicitlyDisclosedAttributeTypeIDs ¶
GetExplicitlyDisclosedAttributeTypeIDs returns all attribute type IDs for explicitly disclosed disclosures.
func GetExplicitlyDisclosedAttributeTypeIDsToOrg ¶
GetExplicitlyDisclosedAttributeTypeIDsToOrg returns all attribute type IDs for explicitly disclosed disclosures to a particular organization.
func GetExplicitlyDisclosedAttributeTypeValues ¶
GetExplicitlyDisclosedAttributeTypeValues returns all attribute values for a type for explicitly disclosed disclosures.
func GetExplicitlyDisclosedAttributeTypeValuesToOrg ¶
func GetExplicitlyDisclosedAttributeTypeValuesToOrg(org string, thetype string) (values []string, err error)
GetExplicitlyDisclosedAttributeTypeValuesToOrg returns all attribute values for a type for explicitly disclosed disclosures to a particular organization.
func GetImplicitDisclosureIDs ¶
GetImplicitDisclosureIDs returns all data disclosures that a recipient of the provided disclosure has derived from the provided disclosure.
func GetImplicitDisclosureIDsChrono ¶
GetImplicitDisclosureIDsChrono is like GetImplicitDisclosureIDs, but also sorts the identifiers in chronological order.
func GetImplicitlyDisclosedAttributeIDs ¶
GetImplicitlyDisclosedAttributeIDs returns all implicitly disclosed attributes.
func GetImplicitlyDisclosedAttributeIDsToOrg ¶
GetImplicitlyDisclosedAttributeIDsToOrg is like GetAttributeIDsToOrg but for implicitly disclosed attributes only.
func GetImplicitlyDisclosedAttributeTypeIDs ¶
GetImplicitlyDisclosedAttributeTypeIDs returns all attribute type IDs for implicity disclosed disclosures.
func GetImplicitlyDisclosedAttributeTypeIDsToOrg ¶
GetImplicitlyDisclosedAttributeTypeIDsToOrg returns all attribute type IDs for implicity disclosed disclosures to a particular organization.
func GetImplicitlyDisclosedAttributeTypeValues ¶
GetImplicitlyDisclosedAttributeTypeValues returns all attribute values for a type for implicty disclosed disclosures.
func GetImplicitlyDisclosedAttributeTypeValuesToOrg ¶
func GetImplicitlyDisclosedAttributeTypeValuesToOrg(org, thetype string) (values []string, err error)
GetImplicitlyDisclosedAttributeTypeValuesToOrg returns all attribute values for a type for implicty disclosed disclosures to a particular organization.
func GetImplictDisclosureIDsToOrg ¶
GetImplictDisclosureIDsToOrg is like GetDisclosureIDsToOrg, but implicit.
func GetNextCoordinateChrono ¶
func GetNextCoordinateChrono(id string) (exists bool, next model.Coordinate, err error)
GetNextCoordinateChrono returns the next coordinate disclosed after the coordinate with the provided identifier.
func GetOrganization ¶
func GetOrganization(id string) (org *model.Organization, err error)
GetOrganization returns the organization with the provided identifier. Returns NoSuchOrgError on no organization with the provided identifier.
func GetOrganizationIDs ¶
GetOrganizationIDs returns all the organization IDs.
func GetPrevCoordinateChrono ¶
func GetPrevCoordinateChrono(id string) (exists bool, prev model.Coordinate, err error)
GetPrevCoordinateChrono returns the previous coordinate disclosed before the coordinate with the provided identifier.
func GetReceivingOrgIDs ¶
GetReceivingOrgIDs returns the organization IDs of organizations that have received a particular attribute.
func PadCoordinate ¶
PadCoordinate pads the coordinate with prefix zeroes
Types ¶
This section is empty.