types

package
v0.0.3 Latest Latest
Warning

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

Go to latest
Published: Mar 14, 2017 License: Apache-2.0 Imports: 1 Imported by: 6

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ImportMeta

type ImportMeta struct {
	Source int    `json:"Source,omitempty"` // enum, 0 stackoverflow
	Id     string `json:"Id,omitempty"`
}

ImportMeta describes where the entry comes from if it comes from anywhere else than borg.

type Problem

type Problem struct {
	Id            string     `json:"Id"`
	Title         string     `json:"Title,omitempty"`
	Solutions     []Solution `json:"Solutions,omitempty"`
	ImportMeta    ImportMeta `json:"ImportMeta,omitempty"`
	CreatedBy     string     `json:"CreatedBy,omitempty"`
	Created       time.Time  `json:"Created,omitempty"`
	LastUpdatedBy string     `json:"LastUpdatedBy,omitempty"`
	LastUpdated   time.Time  `json:"Updated,omitempty"`
}

Problem represents a result to a query. Might rename it to topic later

type Solution

type Solution struct {
	Body  []string `json:"Body,omitempty"`  // this was a mistake to make it a string - after db correction and refactoring should get rid of it
	Score int      `json:"Score,omitempty"` // this has values in the DB but they are not being used for anything. should nuke it. editing an entry nukes it anyway
}

Solution is a snippet inside a `Problem`. Might rename it to snippet...

type Solutions

type Solutions []Solution

Solutions is a helper type for sorting solutions based on score. Only used at bootstrapping

func (Solutions) Len

func (a Solutions) Len() int

func (Solutions) Less

func (a Solutions) Less(i, j int) bool

func (Solutions) Swap

func (a Solutions) Swap(i, j int)

Jump to

Keyboard shortcuts

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