models

package
v0.4.1 Latest Latest
Warning

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

Go to latest
Published: Apr 11, 2022 License: AGPL-3.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Marshal

func Marshal(m Model) []byte

func Unmarshal added in v0.4.0

func Unmarshal(c []byte, m Model) error

Types

type CreateNamespaceRequest added in v0.4.0

type CreateNamespaceRequest struct {
	Name   string `json:"name"`
	Public bool   `json:"public"`
}

type CreateRepoRequest added in v0.4.0

type CreateRepoRequest struct {
	Name      string `json:"name"`
	Namespace string `json:"namespace"`
	Public    bool   `json:"public"`
}

type Model

type Model interface{}

type Namespace added in v0.4.0

type Namespace struct {
	Name   string `json:"name"`
	Public bool   `json:"public"`
}

type NamespacePermission added in v0.4.0

type NamespacePermission struct {
	UserID    string `json:"uid"`
	Namespace string `json:"namespace"`
	Read      bool   `json:"read"`
	Write     bool   `json:"write"`
	Admin     bool   `json:"admin"`
}

type Repo added in v0.4.0

type Repo struct {
	Name      string    `json:"name"`
	Namespace Namespace `json:"namespace"`
	Public    bool      `json:"public"`
}

type RepoPermission added in v0.4.0

type RepoPermission struct {
	UserID   string `json:"uid"`
	RepoName string `json:"repo_name"`
	Read     bool   `json:"read"`
	Write    bool   `json:"write"`
	Admin    bool   `json:"admin"`
}

type User

type User struct {
	UID  string
	Hash plumbing.Hash
}

User is the model of connected users from 3rd party providers such as github

type UserSession

type UserSession struct {
	Hash    plumbing.Hash
	User    User
	Expires time.Time
}

UserSession is a model of a connected users session.

Jump to

Keyboard shortcuts

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