models

package
v0.6.2 Latest Latest
Warning

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

Go to latest
Published: Oct 2, 2023 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 AccessToken

type AccessToken struct {
	ID        int64        `db:"id"`
	Name      string       `db:"name"`
	UserID    int64        `db:"user_id"`
	Token     string       `db:"token"`
	ExpiresAt sql.NullTime `db:"expires_at"`
	CreatedAt time.Time    `db:"created_at"`
	UpdatedAt time.Time    `db:"updated_at"`
}

AccessToken represents an access token.

type Collab

type Collab struct {
	ID          int64              `db:"id"`
	RepoID      int64              `db:"repo_id"`
	UserID      int64              `db:"user_id"`
	AccessLevel access.AccessLevel `db:"access_level"`
	CreatedAt   time.Time          `db:"created_at"`
	UpdatedAt   time.Time          `db:"updated_at"`
}

Collab represents a repository collaborator.

type LFSLock

type LFSLock struct {
	ID        int64     `db:"id"`
	Path      string    `db:"path"`
	UserID    int64     `db:"user_id"`
	RepoID    int64     `db:"repo_id"`
	Refname   string    `db:"refname"`
	CreatedAt time.Time `db:"created_at"`
	UpdatedAt time.Time `db:"updated_at"`
}

LFSLock is a Git LFS lock.

type LFSObject

type LFSObject struct {
	ID        int64     `db:"id"`
	Oid       string    `db:"oid"`
	Size      int64     `db:"size"`
	RepoID    int64     `db:"repo_id"`
	CreatedAt time.Time `db:"created_at"`
	UpdatedAt time.Time `db:"updated_at"`
}

LFSObject is a Git LFS object.

type PublicKey

type PublicKey struct {
	ID        int64  `db:"id"`
	UserID    int64  `db:"user_id"`
	PublicKey string `db:"public_key"`
	CreatedAt string `db:"created_at"`
	UpdatedAt string `db:"updated_at"`
}

PublicKey represents a public key.

type Repo

type Repo struct {
	ID          int64         `db:"id"`
	Name        string        `db:"name"`
	ProjectName string        `db:"project_name"`
	Description string        `db:"description"`
	Private     bool          `db:"private"`
	Mirror      bool          `db:"mirror"`
	Hidden      bool          `db:"hidden"`
	UserID      sql.NullInt64 `db:"user_id"`
	CreatedAt   time.Time     `db:"created_at"`
	UpdatedAt   time.Time     `db:"updated_at"`
}

Repo is a database model for a repository.

type Settings

type Settings struct {
	ID        int64  `db:"id"`
	Key       string `db:"key"`
	Value     string `db:"value"`
	CreatedAt string `db:"created_at"`
	UpdatedAt string `db:"updated_at"`
}

Settings represents a settings record.

type User

type User struct {
	ID        int64          `db:"id"`
	Username  string         `db:"username"`
	Admin     bool           `db:"admin"`
	Password  sql.NullString `db:"password"`
	CreatedAt time.Time      `db:"created_at"`
	UpdatedAt time.Time      `db:"updated_at"`
}

User represents a user.

Jump to

Keyboard shortcuts

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