model

package
v0.4.0 Latest Latest
Warning

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

Go to latest
Published: Feb 9, 2022 License: Apache-2.0 Imports: 0 Imported by: 0

Documentation

Index

Constants

View Source
const OrgRepos = "orgRepos"

Variables

This section is empty.

Functions

This section is empty.

Types

type CombinedStatus

type CombinedStatus struct {
	State    string   `json:"state"`
	Contexts []Status `json:"statuses"`
}

type Commit

type Commit struct {
	// ID for this commit
	// required: true
	ID        int64          `json:"id" meddler:"id,pk"`
	Repo      string         `json:"-" meddler:"repo"`
	SHA       string         `json:"sha"  meddler:"sha"`
	URL       string         `json:"url"  meddler:"url"`
	Author    string         `json:"author"  meddler:"author"`
	AuthorPic string         `json:"author_pic"  meddler:"author_pic"`
	Tags      []string       `json:"tags,omitempty"    meddler:"tags,json"`
	Status    CombinedStatus `json:"status,omitempty"    meddler:"status,json"`
	Message   string         `json:"message"  meddler:"message"`
	Created   int64          `json:"created"  meddler:"created"`
}

Commit represents a Github commit

type KeyValue added in v0.3.0

type KeyValue struct {
	// ID for this repo
	// required: true
	ID int64 `json:"id" meddler:"id,pk"`

	// Key is the name of the setting
	// required: true
	Key string `json:"key"  meddler:"key"`

	// Value is the setting itself
	Value string `json:"value"  meddler:"value"`
}

KeyValue is a key-value pair for simple storage for things fit in the data model

type Status

type Status struct {
	Context     string `json:"context"`
	CreatedAt   string `json:"createdAt"`
	State       string `json:"state"`
	TargetUrl   string `json:"targetURL"`
	Description string `json:"description"`
}

type User

type User struct {
	// ID for this user
	// required: true
	ID int64 `json:"-" meddler:"id,pk"`

	// Login is the username for this user
	// required: true
	Login string `json:"login"  meddler:"login"`

	// Name is the full name for this user
	Name string `json:"name"  meddler:"name"`

	// Login is the username for this user
	// required: true
	Email string `json:"-"  meddler:"email"`

	// GithubToken is the Github oauth token
	AccessToken string `json:"-"  meddler:"access_token"`

	// RefreshToken is the Github refresh token
	RefreshToken string `json:"-"  meddler:"refresh_token"`

	// Expires is the Github token expiry date
	Expires int64 `json:"-"  meddler:"expires"`

	// Secret is the PEM formatted RSA private key used to sign JWT and CSRF tokens
	Secret string `json:"-" meddler:"secret"`

	Repos []string `json:"-" meddler:"repos,json"`

	FavoriteRepos []string `json:"favoriteRepos"  meddler:"favorite_repos,json"`

	FavoriteServices []string `json:"favoriteServices"  meddler:"favorite_services,json"`
}

User is the user representation

Jump to

Keyboard shortcuts

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