models

package
v0.0.0-...-1fa52ee Latest Latest
Warning

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

Go to latest
Published: Apr 3, 2024 License: Apache-2.0, BSD-2-Clause, ISC, + 1 more Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ApiUserResponse

type ApiUserResponse struct {
	Id   int
	Name string `json:"name"`
}

Using User because it requires authentication.

type Assignment

type Assignment struct {
	common.NoPKModel
	ConnectionId uint64
	ResponderId  string `gorm:"primaryKey"`
	IncidentId   string `gorm:"primaryKey"`
}

func (Assignment) TableName

func (Assignment) TableName() string

type Incident

type Incident struct {
	common.NoPKModel
	ConnectionId uint64 `gorm:"primaryKey"`
	Id           string `gorm:"primaryKey"`
	Url          string
	ServiceId    string
	ServiceName  string
	Description  string
	Message      string
	OwnerTeam    string
	Priority     IncidentPriority
	Status       IncidentStatus
	CreatedDate  time.Time
	UpdatedDate  time.Time
}

func (Incident) TableName

func (Incident) TableName() string

type IncidentPriority

type IncidentPriority string

type IncidentStatus

type IncidentStatus string
const (
	IncidentStatusClosed   IncidentStatus = "closed"
	IncidentStatusOpen     IncidentStatus = "open"
	IncidentStatusResolved IncidentStatus = "resolved"
)

type OpsenieScopeConfig

type OpsenieScopeConfig struct {
	common.ScopeConfig `mapstructure:",squash" json:",inline" gorm:"embedded"`
}

func (OpsenieScopeConfig) TableName

func (o OpsenieScopeConfig) TableName() string

type OpsgenieConn

type OpsgenieConn struct {
	helper.RestConnection `mapstructure:",squash"`
	OpsgenieGenieKey      `mapstructure:",squash"`
}

OpsgenieConn holds the essential information to connect to the Opsgenie API

func (OpsgenieConn) Sanitize

func (connection OpsgenieConn) Sanitize() OpsgenieConn

type OpsgenieConnection

type OpsgenieConnection struct {
	helper.BaseConnection `mapstructure:",squash"`
	OpsgenieConn          `mapstructure:",squash"`
}

OpsgenieConnection holds OpsgenieConn plus ID/Name for database storage

func (*OpsgenieConnection) MergeFromRequest

func (connection *OpsgenieConnection) MergeFromRequest(target *OpsgenieConnection, body map[string]interface{}) error

func (OpsgenieConnection) Sanitize

func (connection OpsgenieConnection) Sanitize() OpsgenieConnection

func (OpsgenieConnection) TableName

func (OpsgenieConnection) TableName() string

type OpsgenieGenieKey

type OpsgenieGenieKey helper.AccessToken

AccessToken implements HTTP Token Authentication with Access Token

func (*OpsgenieGenieKey) SetupAuthentication

func (gk *OpsgenieGenieKey) SetupAuthentication(request *http.Request) errors.Error

SetupAuthentication sets up the request headers for authentication

type OpsgenieParams

type OpsgenieParams struct {
	ConnectionId uint64
	ScopeId      string
}

type OpsgenieResponse

type OpsgenieResponse struct {
	Name string `json:"name"`
	ID   int    `json:"id"`
	OpsgenieConnection
}

This object conforms to what the frontend currently expects.

type Responder

type Responder struct {
	common.NoPKModel
	ConnectionId uint64 `gorm:"primaryKey"`
	Id           string `gorm:"primaryKey;autoIncrement:false"`
	Type         string
	FullName     string
	Name         string
}

func (Responder) TableName

func (Responder) TableName() string

type Service

type Service struct {
	common.Scope `mapstructure:",squash"`
	Id           string `json:"id" mapstructure:"id" gorm:"primaryKey;autoIncrement:false" `
	Url          string `json:"url" mapstructure:"url"`
	Name         string `json:"name" mapstructure:"name"`
	TeamId       string `json:"team_id" mapstructure:"team_id"`
}

func (Service) ScopeFullName

func (s Service) ScopeFullName() string

func (Service) ScopeId

func (s Service) ScopeId() string

func (Service) ScopeName

func (s Service) ScopeName() string

func (Service) ScopeParams

func (s Service) ScopeParams() interface{}

func (Service) TableName

func (s Service) TableName() string

type Team

type Team struct {
	common.NoPKModel
	ConnectionId uint64 `gorm:"primaryKey"`
	Id           string `gorm:"primaryKey;autoIncrement:false"`
	Name         string
	Description  string
}

func (Team) TableName

func (Team) TableName() string

type User

type User struct {
	common.NoPKModel
	ConnectionId uint64 `gorm:"primaryKey"`
	Id           string `gorm:"primaryKey;autoIncrement:false"`
	Username     string
	FullName     string
}

func (User) TableName

func (User) TableName() string

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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