v1

package
v0.0.0-...-6899a91 Latest Latest
Warning

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

Go to latest
Published: Mar 5, 2019 License: BSD-3-Clause Imports: 9 Imported by: 0

Documentation

Index

Constants

View Source
const ApplicationBasePath = "/applications"

ApplicationBasePath is the URL base path for this resource

View Source
const BadgeBasePath = "/badges"

BadgeBasePath is the URL base path for this resource

View Source
const ContentBasePath = "/content"

ContentBasePath is the URL base path for this resource

View Source
const DeploymentBasePath = "/deployments"

DeploymentBasePath is the URL base path for this resource

View Source
const DomainBasePath = "/domains"

DomainBasePath is the URL base path for this resource

View Source
const EnvironmentBasePath = "/environments"

EnvironmentBasePath is the URL base path for this resource

View Source
const FreeSearch = "freesearch"

FreeSearch is a keyword for the free text mode search mode for applications

Variables

This section is empty.

Functions

This section is empty.

Types

type Application

type Application struct {
	ID              uint       `json:"-" gorm:"auto increment" binding:"-"`
	Domain          string     `json:"domain" path:"domain" description:"Application Domain"`
	Name            string     `json:"name" path:"name" description:"Application Name"`
	LatestRelease   *Release   `json:"-" binding:"-"`
	LatestReleaseID *uint      `json:"-" binding:"-"`
	CreatedAt       time.Time  `json:"_createdAt" binding:"-"`
	UpdatedAt       time.Time  `json:"_updatedAt" binding:"-"`
	DeletedAt       *time.Time `json:"-" binding:"-"`
	hateoas.Resource
}

Application defines an application

func (*Application) GetDeletedAt

func (app *Application) GetDeletedAt() *time.Time

GetDeletedAt implements SoftDeletableEntity

func (*Application) GetID

func (app *Application) GetID() string

GetID returns the public ID of the entity

func (*Application) GetSelfURL

func (app *Application) GetSelfURL(baseURL string) string

GetSelfURL implements Resourceable

func (*Application) SetID

func (app *Application) SetID(id string) error

SetID sets up the new ID of the entity

func (*Application) ToResource

func (app *Application) ToResource(baseURL string)

ToResource implements Resourceable

type ApplicationVersionGraph

type ApplicationVersionGraph struct {
	PublicID  string          `json:"id" description:"Application public identifier"`
	Domain    string          `json:"domain" description:"Application Domain"`
	Name      string          `json:"name" description:"Application Name"`
	Version   string          `json:"version" description:"Application Version"`
	Manifest  json.RawMessage `json:"manifest"`
	Tags      []string        `json:"tags,omitempty" `
	CreatedAt time.Time       `json:"_createdAt" `
	UpdatedAt time.Time       `json:"_updatedAt" `
}

ApplicationVersionGraph is an application version instance on a given environment

func (*ApplicationVersionGraph) GetEdges

GetEdges get all dependencies

func (*ApplicationVersionGraph) GetID

func (a *ApplicationVersionGraph) GetID() string

GetID return ID

func (*ApplicationVersionGraph) GetName

func (a *ApplicationVersionGraph) GetName() string

GetName get all dependencies

func (*ApplicationVersionGraph) GetType

func (a *ApplicationVersionGraph) GetType() string

GetType get entity type

type Badge

type Badge struct {
	ID        uint           `json:"-" gorm:"auto increment" binding:"-"`
	Slug      string         `json:"slug" gorm:"type:varchar(255);unique;not null;default:''" path:"slug" description:"Badge identifier"`
	Title     string         `json:"title" gorm:"type:varchar(255);not null;"`
	Type      string         `json:"type" enum:"enum"`
	Levels    postgres.Jsonb `json:"levels,omitempty" validate:"required"`
	CreatedAt time.Time      `json:"_createdAt" binding:"-"`
	UpdatedAt time.Time      `json:"_updatedAt" binding:"-"`
	DeletedAt *time.Time     `json:"-" binding:"-"`
	hateoas.Resource
}

Badge is a gamification badge type

func (*Badge) GetDeletedAt

func (badge *Badge) GetDeletedAt() *time.Time

GetDeletedAt implements SoftDeletableEntity

func (*Badge) GetID

func (badge *Badge) GetID() string

GetID returns the public ID of the entity

func (*Badge) GetSelfURL

func (badge *Badge) GetSelfURL(baseURL string) string

GetSelfURL implements Resourceable

func (*Badge) SetID

func (badge *Badge) SetID(id string) error

SetID sets up the new ID of the entity

func (*Badge) ToResource

func (badge *Badge) ToResource(baseURL string)

ToResource implements Resourceable

type BadgeLevel

type BadgeLevel struct {
	ID          string `json:"id" validate:"not null; not empty" description:"Badge level identifier"`
	Label       string `json:"label" validate:"not null; not empty"`
	Description string `json:"description"`
	Color       string `json:"color" validate:"not null"`
	IsDefault   bool   `json:"isdefault" validate:"not null" default:"false"`
}

BadgeLevel is a gamification badge level type

type BadgeRating

type BadgeRating struct {
	BadgeID    string      `json:"badgeslug,omitempty" validate:"not null; not empty"`
	Badge      *Badge      `json:"-"`
	Release    *Release    `json:"-"`
	BadgeTitle string      `json:"badgetitle,omitempty"`
	Value      string      `json:"value" validate:"not null; not empty"`
	Comment    string      `json:"comment"`
	Level      *BadgeLevel `json:"level,omitempty"`
	hateoas.Resource
}

BadgeRating is a rating for a badge

func (*BadgeRating) GetSelfURL

func (br *BadgeRating) GetSelfURL(baseURL string) string

GetSelfURL implements Resourceable

func (*BadgeRating) ToResource

func (br *BadgeRating) ToResource(baseURL string)

ToResource implements Resourceable

type Content

type Content struct {
	ID          uint       `json:"-" binding:"-" gorm:"auto increment"`
	Name        string     `json:"-" path:"name" description:"Content data"`
	ContentType string     `json:"-" header:"content-type" description:"Content mime type"`
	Locale      string     `json:"-" path:"locale" description:"Locale"`
	Body        []byte     `json:"-" description:"Content body"`
	CreatedAt   time.Time  `json:"-" binding:"-"`
	UpdatedAt   time.Time  `json:"-" binding:"-"`
	DeletedAt   *time.Time `json:"-" binding:"-"`
	hateoas.Resource
}

Content define a content resource

func (*Content) GetBytes

func (p *Content) GetBytes() []byte

GetBytes get all bytes

func (*Content) GetContentType

func (p *Content) GetContentType() string

GetContentType get content type

func (*Content) GetDeletedAt

func (cont *Content) GetDeletedAt() *time.Time

GetDeletedAt implements SoftDeletableEntity

func (*Content) GetID

func (cont *Content) GetID() string

GetID returns the public ID of the entity

func (*Content) GetSelfURL

func (cont *Content) GetSelfURL(baseURL string) string

GetSelfURL implements Resourceable

func (*Content) SetBytes

func (p *Content) SetBytes(data []byte)

SetBytes set all bytes

func (*Content) SetID

func (cont *Content) SetID(id string) error

SetID sets up the new ID of the entity

func (*Content) ToResource

func (cont *Content) ToResource(baseURL string)

ToResource implements Resourceable

type Dependency

type Dependency struct {
	ID       uint `json:"-" gorm:"auto increment"`
	Owner    Release
	OwnerID  uint `json:"-" gorm:"type:bigint;not null;default:0"`
	Target   Release
	TargetID uint `json:"-" gorm:"type:bigint;not null;default:0"`
}

Dependency defines a inter-application link

type Deployment

type Deployment struct {
	ID            uint           `json:"-" gorm:"auto increment" binding:"-"`
	PublicID      string         `` /* 163-byte string literal not displayed */
	ApplicationID uint           `json:"-" gorm:"not null;type:bigint;default:0"`
	Application   *Release       `json:"-"`
	EnvironmentID uint           `json:"-" gorm:"not null;type:bigint;default:0"`
	Environment   *Environment   `json:"-"`
	Dependencies  postgres.Jsonb `json:"dependencies,omitempty" binding:"-"`
	Properties    postgres.Jsonb `json:"properties,omitempty"`
	UndeployedAt  *time.Time     `json:"undeployedAt,omitempty" binding:"-"`
	CreatedAt     time.Time      `json:"_createdAt" binding:"-"`
	UpdatedAt     time.Time      `json:"_updatedAt" binding:"-"`
	DeletedAt     *time.Time     `json:"-" binding:"-"`
	hateoas.Resource
}

Deployment is an application version instance on a given environment

func (*Deployment) GetDeletedAt

func (dep *Deployment) GetDeletedAt() *time.Time

GetDeletedAt implements SoftDeletableEntity

func (*Deployment) GetID

func (dep *Deployment) GetID() string

GetID returns the public ID of the entity

func (*Deployment) GetSelfURL

func (dep *Deployment) GetSelfURL(baseURL string) string

GetSelfURL implements Resourceable

func (*Deployment) SetID

func (dep *Deployment) SetID(id string) error

SetID sets up the new ID of the entity

func (*Deployment) ToResource

func (dep *Deployment) ToResource(baseURL string)

ToResource implements Resourceable

type DeploymentDependency

type DeploymentDependency struct {
	TargetID string `json:"target"`
	Type     string `json:"type"`
	hateoas.Resource
}

DeploymentDependency defines a inter-deployment link

type DeploymentGraph

type DeploymentGraph struct {
	PublicID     string                 `json:"id" description:"Deployment public identifier"`
	Application  graphapi.ImplementNode `json:"application"`
	Environment  graphapi.ImplementNode `json:"environment"`
	Dependencies json.RawMessage        `json:"dependencies,omitempty" binding:"-"`
	Properties   json.RawMessage        `json:"properties,omitempty"`
	UndeployedAt *time.Time             `json:"undeployedAt,omitempty" binding:"-"`
	CreatedAt    time.Time              `json:"_createdAt" binding:"-"`
	UpdatedAt    time.Time              `json:"_updatedAt" binding:"-"`
}

DeploymentGraph is an application version instance on a given environment

func (*DeploymentGraph) GetEdges

func (d *DeploymentGraph) GetEdges() []graphapi.ImplementEdge

GetEdges get all dependencies

func (*DeploymentGraph) GetID

func (d *DeploymentGraph) GetID() string

GetID get deployment ID

func (*DeploymentGraph) GetName

func (d *DeploymentGraph) GetName() string

GetName get all dependencies

func (*DeploymentGraph) GetType

func (d *DeploymentGraph) GetType() string

GetType get entity type

type Domain

type Domain struct {
	Name     string `json:"name" path:"domain" description:"Application Domain"`
	AppCount uint   `json:"_app_count" binding:"-"`
	hateoas.Resource
}

Domain define a business domain

func (*Domain) GetID

func (dom *Domain) GetID() string

GetID returns the public ID of the entity

func (*Domain) GetSelfURL

func (dom *Domain) GetSelfURL(baseURL string) string

GetSelfURL implements Resourceable

func (*Domain) SetID

func (dom *Domain) SetID(id string) error

SetID sets up the new ID of the entity

func (*Domain) ToResource

func (dom *Domain) ToResource(baseURL string)

ToResource implements Resourceable

type Environment

type Environment struct {
	ID         uint           `json:"-" gorm:"auto increment" binding:"-"`
	Slug       string         `json:"slug" gorm:"type:varchar(255);unique;not null;default:''" path:"slug" description:"Environment identifier"`
	Name       string         `json:"name" gorm:"type:varchar(255)"`
	Properties postgres.Jsonb `json:"properties,omitempty"`
	CreatedAt  time.Time      `json:"_createdAt" binding:"-"`
	UpdatedAt  time.Time      `json:"_updatedAt" binding:"-"`
	DeletedAt  *time.Time     `json:"-" binding:"-"`
	hateoas.Resource
}

Environment is a target deployment environment

func (*Environment) GetDeletedAt

func (env *Environment) GetDeletedAt() *time.Time

GetDeletedAt implements SoftDeletableEntity

func (*Environment) GetID

func (env *Environment) GetID() string

GetID returns the public ID of the entity

func (*Environment) GetSelfURL

func (env *Environment) GetSelfURL(baseURL string) string

GetSelfURL implements Resourceable

func (*Environment) SetID

func (env *Environment) SetID(id string) error

SetID sets up the new ID of the entity

func (*Environment) ToResource

func (env *Environment) ToResource(baseURL string)

ToResource implements Resourceable

type EnvironmentGraph

type EnvironmentGraph struct {
	PublicID   string          `json:"id" description:"environment public identifier"`
	Slug       string          `json:"slug" description:"Environment identifier"`
	Name       string          `json:"name"`
	Properties json.RawMessage `json:"properties,omitempty"`
	CreatedAt  time.Time       `json:"_createdAt" binding:"-"`
	UpdatedAt  time.Time       `json:"_updatedAt" binding:"-"`
}

EnvironmentGraph is an application version instance on a given environment

func (*EnvironmentGraph) GetEdges

func (e *EnvironmentGraph) GetEdges() []graphapi.ImplementEdge

GetEdges get all dependencies

func (*EnvironmentGraph) GetID

func (e *EnvironmentGraph) GetID() string

GetID return ID

func (*EnvironmentGraph) GetName

func (e *EnvironmentGraph) GetName() string

GetName get all dependencies

func (*EnvironmentGraph) GetType

func (e *EnvironmentGraph) GetType() string

GetType get entity type

type Release

type Release struct {
	ID           uint            `json:"-" gorm:"auto increment" binding:"-"`
	Domain       string          `` /* 175-byte string literal not displayed */
	Name         string          `` /* 169-byte string literal not displayed */
	Version      string          `` /* 178-byte string literal not displayed */
	Properties   *postgres.Jsonb `json:"properties"`
	Manifest     *postgres.Jsonb `json:"manifest"`
	Tags         pq.StringArray  `json:"tags,omitempty" gorm:"type:varchar(255)[]"`
	Dependencies []Dependency    `json:"-"`
	Deployments  []Deployment    `json:"-"`
	CreatedAt    time.Time       `json:"_createdAt" binding:"-"`
	UpdatedAt    time.Time       `json:"_updatedAt" binding:"-"`
	DeletedAt    *time.Time      `json:"-" binding:"-"`
	BadgeRatings *postgres.Jsonb `json:"-" binding:"-"`
	hateoas.Resource
}

Release defines the model properties of an application version

func (*Release) GetDeletedAt

func (app *Release) GetDeletedAt() *time.Time

GetDeletedAt implements SoftDeletableEntity

func (*Release) GetID

func (app *Release) GetID() string

GetID returns the public ID of the entity

func (*Release) GetSelfURL

func (app *Release) GetSelfURL(baseURL string) string

GetSelfURL implements Resourceable

func (*Release) SetID

func (app *Release) SetID(id string) error

SetID sets up the new ID of the entity

func (*Release) ToResource

func (app *Release) ToResource(baseURL string)

ToResource implements Resourceable

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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