event

package
v0.0.0-...-a6451ee Latest Latest
Warning

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

Go to latest
Published: Feb 8, 2024 License: Apache-2.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Event

type Event struct {
	Title      string `json:"title" example:"Deployment service lambda" validate:"required"`
	Attributes EventAttributes
	Links      EventLinks
	Metadata   EventMetadata
}

type EventAttributes

type EventAttributes struct {
	Message   string `json:"message" example:"deployment service lambda version v0.0.0" validate:"required"`
	Source    string `json:"source" example:"github_action" validate:"required"`
	Type      string `json:"type" example:"deployment" validate:"required"`
	Priority  string `json:"priority" example:"P1" validate:"required"`
	RelatedId string `json:"related_id" example:"53aa35c8-e659-44b2-882f-f6056e443c99"`
	Service   string `json:"service" example:"service-event" validate:"required"`
	Status    string `json:"status" example:"success" validate:"required"`
}

type EventGetter

type EventGetter interface {
	Event() EventInterface
}

type EventInterface

type EventInterface interface {
	Create(ctx context.Context, Event *Event) (*Event, error)
	List(ctx context.Context) ([]Event, error)
	Get(ctx context.Context, filter map[string]interface{}) (*Event, error)
	Count(ctx context.Context) (int64, error)
	Search(ctx context.Context, filter map[string]interface{}) ([]Event, error)
}

EventInterface has methods to work with Event resources.

type EventLinks struct {
	PullRequestLink string `json:"pull_request_link" example:"https://github.com/jplanckeel/events-tracker/pull/240"`
}

type EventMetadata

type EventMetadata struct {
	CreatedAt time.Time `json:"created_at"`
	Duration  float64   `json:"duration"`
	Id        string    `json:"id"`
}

type EventSearch

type EventSearch struct {
	Source    string
	EventType string
	Priority  string
	Status    string
	Service   string
	StartDate string
	EndDate   string
}

type EventsV1Client

type EventsV1Client struct {
	// contains filtered or unexported fields
}

EventsV1Client is used to interact with features

func NewClient

func NewClient() EventsV1Client

func (*EventsV1Client) EventsTracker

func (c *EventsV1Client) EventsTracker(collection string) EventInterface

Jump to

Keyboard shortcuts

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