schema

package
v0.0.0-...-ffead0f Latest Latest
Warning

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

Go to latest
Published: Oct 31, 2022 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

View Source
const (
	AccountCollectionName = "account"
)
View Source
const (
	AccountPrivateCollectionName = "account_private"
)
View Source
const (
	// ComponentCollectionName 은 실제로 별도의 Collection 에 저장하지 않음.
	ComponentCollectionName = "component"
)
View Source
const (
	ImageCollectionName = "image"
)
View Source
const (
	RepositoryCollectionName = "repository"
)

Variables

View Source
var (
	AccountDefaultIndex = mongo.IndexModel{
		Keys:    bsonx.Doc{{Key: "username", Value: bsonx.Int32(1)}, {Key: "registry_type", Value: bsonx.Int32(1)}, {Key: "registry_url", Value: bsonx.Int32(1)}},
		Options: options.Index().SetUnique(true),
	}
)
View Source
var (
	ImageDefaultIndex = mongo.IndexModel{
		Keys:    bsonx.Doc{{Key: "repository_id", Value: bsonx.Int32(1)}, {Key: "tag", Value: bsonx.Int32(1)}},
		Options: options.Index().SetUnique(true),
	}
)
View Source
var (
	RepositoryDefaultIndex = mongo.IndexModel{
		Keys:    bsonx.Doc{{Key: "account_id", Value: bsonx.Int32(1)}, {Key: "name", Value: bsonx.Int32(1)}},
		Options: options.Index().SetUnique(true),
	}
)

Functions

This section is empty.

Types

type Account

type Account struct {
	Id           primitive.ObjectID `json:"_id,omitempty" bson:"_id,omitempty"`
	RegistryType string             `json:"registry_type" bson:"registry_type"`
	RegistryUrl  string             `json:"registry_url" bson:"registry_url"`
	Username     string             `json:"username" bson:"username"`
	Nickname     string             `json:"nickname" bson:"nickname"`
}

type AccountPrivate

type AccountPrivate struct {
	AccountId primitive.ObjectID `json:"_id" bson:"_id"`
	Password  string             `json:"password" bson:"password"`
}

type Component

type Component struct {
	Id             primitive.ObjectID `json:"_id,omitempty" bson:"_id,omitempty"`
	RepositoryId   primitive.ObjectID `json:"repository_id" bson:"repository_id"`
	IsAlwaysLatest bool               `json:"is_always_latest" bson:"is_always_latest"`
	ImageId        primitive.ObjectID `json:"image_id,omitempty" bson:"image_id,omitempty"`
}

type Image

type Image struct {
	Id           primitive.ObjectID `json:"_id,omitempty" bson:"_id,omitempty"`
	RepositoryId primitive.ObjectID `json:"repository_id" bson:"repository_id"`
	Tag          string             `json:"tag" bson:"tag"`
	UpdatedAt    time.Time          `json:"updated_at" bson:"updated_at"`
}

type Repository

type Repository struct {
	Id        primitive.ObjectID `json:"_id,omitempty" bson:"_id,omitempty"`
	Name      string             `json:"name" bson:"name"`
	AccountId primitive.ObjectID `json:"account_id" bson:"account_id"`
}

Jump to

Keyboard shortcuts

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