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
	UserId         string `gorm:"primaryKey"`
	IncidentNumber int    `gorm:"primaryKey"`
	AssignedAt     time.Time
}

func (Assignment) TableName

func (Assignment) TableName() string

type Incident

type Incident struct {
	common.NoPKModel
	ConnectionId uint64 `gorm:"primaryKey"`
	Number       int    `gorm:"primaryKey"`
	Url          string
	ServiceId    string
	Summary      string
	Status       IncidentStatus  //acknowledged, triggered, resolved
	Urgency      IncidentUrgency //high or low
	Priority     string
	CreatedDate  time.Time
	UpdatedDate  time.Time
}

func (Incident) TableName

func (Incident) TableName() string

type IncidentStatus

type IncidentStatus string
const (
	IncidentStatusAcknowledged IncidentStatus = "acknowledged"
	IncidentStatusTriggered    IncidentStatus = "triggered"
	IncidentStatusResolved     IncidentStatus = "resolved"
)

type IncidentUrgency

type IncidentUrgency string

type PagerDutyAccessToken

type PagerDutyAccessToken helper.AccessToken

AccessToken implements HTTP Token Authentication with Access Token

func (*PagerDutyAccessToken) SetupAuthentication

func (at *PagerDutyAccessToken) SetupAuthentication(request *http.Request) errors.Error

SetupAuthentication sets up the request headers for authentication

type PagerDutyConn

type PagerDutyConn struct {
	helper.RestConnection `mapstructure:",squash"`
	PagerDutyAccessToken  `mapstructure:",squash"`
}

PagerDutyConn holds the essential information to connect to the PagerDuty API

type PagerDutyConnection

type PagerDutyConnection struct {
	helper.BaseConnection `mapstructure:",squash"`
	PagerDutyConn         `mapstructure:",squash"`
}

PagerDutyConnection holds GitlabConn plus ID/Name for database storage

func (*PagerDutyConnection) MergeFromRequest

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

func (PagerDutyConnection) Sanitize

func (connection PagerDutyConnection) Sanitize() PagerDutyConnection

func (PagerDutyConnection) TableName

func (PagerDutyConnection) TableName() string

type PagerDutyParams

type PagerDutyParams struct {
	ConnectionId uint64
	ScopeId      string
}

type PagerDutyResponse

type PagerDutyResponse struct {
	Name string `json:"name"`
	ID   int    `json:"id"`
	PagerDutyConnection
}

This object conforms to what the frontend currently expects.

type PagerdutyScopeConfig

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

func (PagerdutyScopeConfig) TableName

func (p PagerdutyScopeConfig) 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"`
}

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 User

type User struct {
	common.NoPKModel
	ConnectionId uint64 `gorm:"primaryKey"`
	Id           string `gorm:"primaryKey;autoIncrement:false"`
	Url          string
	Name         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