snow

package
v0.0.5 Latest Latest
Warning

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

Go to latest
Published: Nov 15, 2022 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ToUnixString added in v0.0.3

func ToUnixString(date string) string

Types

type Client

type Client struct {
	BaseURL         string
	Username        string
	Password        string
	TLSClientConfig *tls.Config
}

func NewClient

func NewClient(baseURL string, username string, password string) *Client

func (*Client) Fetch

func (c *Client) Fetch(ctx context.Context, endpoint string, results interface{}) (interface{}, error)

func (*Client) Incident

func (c *Client) Incident(ctx context.Context) ([]Incident, error)

func (*Client) Request

func (c *Client) Request() (*resty.Request, error)

type Incident

type Incident struct {
	ShortDescription string `json:"short_description"`
	ClosedAt         string `json:"closed_at"`
	Description      string `json:"description"`
	Priority         string `json:"priority"`
	ChildIncidents   string `json:"child_incidents"`
	SysId            string `json:"sys_id"`
	Number           string `json:"number"`
	OpenedAt         string `json:"opened_at"`
	ResolvedBy       string `json:"resolved_by"`
	CallerId         string `json:"caller_id"`
	Location         string `json:"location"`
	State            string `json:"state"`
	AssignedTo       string `json:"assigned_to"`
	AssignmentGroup  string `json:"assignment_group"`
	SysUpdatedOn     string `json:"sys_updated_on"`
}

func (Incident) ModifiedAt added in v0.0.3

func (i Incident) ModifiedAt() string

type IncidentList

type IncidentList struct {
	Result []Incident `json:"result"`
}

Jump to

Keyboard shortcuts

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