model

package
v0.0.0-...-e4b6a09 Latest Latest
Warning

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

Go to latest
Published: Oct 22, 2024 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type EventTarget

type EventTarget struct {
	Type           string `json:"type"`
	Address        string `json:"address"`
	AuthHeader     string `json:"auth_header,omitempty"`
	SkipCertVerify bool   `json:"skip_cert_verify"`
	PayloadFormat  string `json:"payload_format,omitempty"`
}

EventTarget defines the structure of target a notification send to

type Policy

type Policy struct {
	ID           int64         `orm:"pk;auto;column(id)" json:"id"`
	Name         string        `orm:"column(name)" json:"name"`
	Description  string        `orm:"column(description)" json:"description"`
	ProjectID    int64         `orm:"column(project_id)" json:"project_id"`
	TargetsDB    string        `orm:"column(targets)" json:"-"`
	Targets      []EventTarget `orm:"-" json:"targets"`
	EventTypesDB string        `orm:"column(event_types)" json:"-"`
	EventTypes   []string      `orm:"-" json:"event_types"`
	Creator      string        `orm:"column(creator)" json:"creator"`
	CreationTime time.Time     `orm:"column(creation_time);auto_now_add" json:"creation_time" sort:"default:desc"`
	UpdateTime   time.Time     `orm:"column(update_time);auto_now_add" json:"update_time"`
	Enabled      bool          `orm:"column(enabled)" json:"enabled"`
}

Policy ...

func (*Policy) ConvertFromDBModel

func (w *Policy) ConvertFromDBModel() error

ConvertFromDBModel convert from DB model data to struct data

func (*Policy) ConvertToDBModel

func (w *Policy) ConvertToDBModel() error

ConvertToDBModel convert struct data in notification policy to DB model data

func (*Policy) TableName

func (w *Policy) TableName() string

TableName set table name for ORM.

Jump to

Keyboard shortcuts

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