models

package
v0.0.0-...-f1d225e Latest Latest
Warning

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

Go to latest
Published: Jun 19, 2017 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type GroupTag

type GroupTag struct {
	Id        string `db:"id"`
	SrcTagID  string
	SrcTag    *Tag `db:"src_tag"`
	DstTagID  string
	DstTag    *Tag `db:"dst_tag"`
	CreatedAt time.Time
}

func (GroupTag) TableName

func (GroupTag) TableName() string

type Model

type Model interface {
	TableName() string
}

type Project

type Project struct {
	ID        string      `db:"id"`
	Name      string      `db:"name"`
	URL       string      `db:"url"`
	ApiKey    string      `db:"api_key"`
	CreatedAt time.Time   `db:"created_at"`
	UpdatedAt time.Time   `db:"updated_at"`
	DeletedAt pq.NullTime `db:"deleted_at"`
	UserID    string      `db:"user_id"`
	User      *User       `db:"observr_user"`
}

func (Project) TableName

func (Project) TableName() string

type Tag

type Tag struct {
	ID          string         `db:"id"`
	Key         string         `db:"key"`
	Value       string         `db:"value"`
	Data        sql.NullString `db:"data"`
	CreatedAt   time.Time      `db:"created_at"`
	FirstSeenAt pq.NullTime    `db:"first_seen_at"`
	LastSeenAt  pq.NullTime    `db:"last_seen_at"`
	ProjectID   string         `db:"project_id"`
	Project     *Project       `db:"observr_project"`
	SeenCount   time.Time      `db:"seen_count"`
}

func (Tag) TableName

func (Tag) TableName() string

type User

type User struct {
	ID        string      `db:"id"`
	Username  string      `db:"username"`
	Email     string      `db:"email"`
	Password  string      `db:"password"`
	ApiKey    string      `db:"api_key"`
	CreatedAt time.Time   `db:"created_at"`
	UpdatedAt time.Time   `db:"updated_at"`
	DeletedAt pq.NullTime `db:"deleted_at"`
}

func (User) TableName

func (User) TableName() string

type Visit

type Visit struct {
	ID          string         `db:"id"`
	Host        string         `db:"host"`
	Path        string         `db:"path"`
	RemoteAddr  string         `db:"remote_addr"`
	Method      string         `db:"method"`
	UserAgent   sql.NullString `db:"user_agent"`
	StatusCode  int            `db:"status_code"`
	Protocol    string         `db:"protocol"`
	Data        sql.NullString `db:"data"`
	Headers     sql.NullString `db:"headers"`
	Cookies     sql.NullString `db:"cookies"`
	Referer     sql.NullString `db:"referer"`
	QueryString sql.NullString `db:"query_string"`
	ProjectID   string         `db:"project_id"`
	Project     *Project       `db:"observr_project"`
	CreatedAt   time.Time      `db:"created_at"`
}

func (Visit) TableName

func (Visit) TableName() string

type VisitTag

type VisitTag struct {
	Id        string `db:"id"`
	VisitID   string
	TagID     string
	CreatedAt time.Time
}

func (VisitTag) TableName

func (VisitTag) TableName() string

Jump to

Keyboard shortcuts

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