repo

package
v0.0.0-...-0f43fba Latest Latest
Warning

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

Go to latest
Published: Dec 9, 2024 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

View Source
const MinSizeInMb = 300

Variables

This section is empty.

Functions

This section is empty.

Types

type Branch

type Branch struct {
	ID        *int32            `json:"id"`
	Name      string            `json:"name"`
	Status    db.BranchStatus   `json:"status"`
	PgStatus  db.BranchPgStatus `json:"pgStatus"`
	Port      int32             `json:"port"`
	ParentID  *int32            `json:"parentId"`
	CreatedAt time.Time         `json:"createdAt"`
	UpdatedAt time.Time         `json:"updatedAt"`
}

type BranchClose

type BranchClose struct {
	Name string `json:"name" validate:"required,min=1,max=100,excludesall= "`
}

type BranchInit

type BranchInit struct {
	Name     string `json:"name" validate:"required,min=1,max=100,excludesall= "`
	ParentId int32  `json:"parentId" validate:"required,numeric"`
}

type Config

type Config struct {
	Name     string `json:"name" validate:"required,min=1,excludesall= "`
	Path     string `json:"path" validate:"required,min=1,excludesall= "`
	RepoType string `json:"repoType" validate:"oneof=block virtual,excludesall= "`
	SizeInMb int64  `json:"sizeInMb" validate:"required_if=RepoType virtual"`
}

type Info

type Info interface {
	GetName() string
	GetPath() string
	GetRepoType() string
	GetSizeInMb() int64
}

Info needs to be replaced with the Config type TODO

type InitDto

type InitDto[T pg.HostImportReqDto] struct {
	RepoConfig Config `json:"repoConfig"`
	PgConfig   T      `json:"pgConfig"`
}

func (*InitDto[T]) GetName

func (initDto *InitDto[T]) GetName() string

func (*InitDto[T]) GetPath

func (initDto *InitDto[T]) GetPath() string

func (*InitDto[T]) GetRepoType

func (initDto *InitDto[T]) GetRepoType() string

func (*InitDto[T]) GetSizeInMb

func (initDto *InitDto[T]) GetSizeInMb() int64

type Pool

type Pool struct {
	ID        *int32 `json:"id"`
	Type      string `json:"type"`
	SizeInMb  int64  `json:"sizeInMb"`
	Path      string `json:"path"`
	MountPath string `json:"mountPath"`
}

type Response

type Response struct {
	ID        *int32        `json:"id"`
	Name      string        `json:"name"`
	PgVersion int32         `json:"pgVersion"`
	Status    db.RepoStatus `json:"status"`
	Output    *string       `json:"output"`
	Pool      Pool          `json:"pool"`
	Branches  []Branch      `json:"branches"`
	CreatedAt time.Time     `json:"createdAt"`
	UpdatedAt time.Time     `json:"updatedAt"`
}

Jump to

Keyboard shortcuts

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