Documentation
¶
Index ¶
- Constants
- type Application
- type ApplicationVersionGraph
- type Badge
- type BadgeLevel
- type BadgeRating
- type Content
- func (p *Content) GetBytes() []byte
- func (p *Content) GetContentType() string
- func (cont *Content) GetDeletedAt() *time.Time
- func (cont *Content) GetID() string
- func (cont *Content) GetSelfURL(baseURL string) string
- func (p *Content) SetBytes(data []byte)
- func (cont *Content) SetID(id string) error
- func (cont *Content) ToResource(baseURL string)
- type Dependency
- type Deployment
- type DeploymentDependency
- type DeploymentGraph
- type Domain
- type Environment
- type EnvironmentGraph
- type Release
Constants ¶
const ApplicationBasePath = "/applications"
ApplicationBasePath is the URL base path for this resource
const BadgeBasePath = "/badges"
BadgeBasePath is the URL base path for this resource
const ContentBasePath = "/content"
ContentBasePath is the URL base path for this resource
const DeploymentBasePath = "/deployments"
DeploymentBasePath is the URL base path for this resource
const DomainBasePath = "/domains"
DomainBasePath is the URL base path for this resource
const EnvironmentBasePath = "/environments"
EnvironmentBasePath is the URL base path for this resource
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 ¶
func (a *ApplicationVersionGraph) GetEdges() []graphapi.ImplementEdge
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 ¶
GetDeletedAt implements SoftDeletableEntity
func (*Badge) GetSelfURL ¶
GetSelfURL implements Resourceable
func (*Badge) SetID ¶
SetID sets up the new ID of the entity
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) GetContentType ¶
GetContentType get content type
func (*Content) GetDeletedAt ¶
GetDeletedAt implements SoftDeletableEntity
func (*Content) GetID ¶
GetID returns the public ID of the entity
func (*Content) GetSelfURL ¶
GetSelfURL implements Resourceable
func (*Content) SetID ¶
SetID sets up the new ID of the entity
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) 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) GetSelfURL ¶
GetSelfURL implements Resourceable
func (*Domain) SetID ¶
SetID sets up the new ID of the entity
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) 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 ¶
GetDeletedAt implements SoftDeletableEntity
func (*Release) GetID ¶
GetID returns the public ID of the entity
func (*Release) GetSelfURL ¶
GetSelfURL implements Resourceable
func (*Release) SetID ¶
SetID sets up the new ID of the entity
Source Files
¶
- resources.go
- type.go