sentry

package
v0.4.6 Latest Latest
Warning

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

Go to latest
Published: Jun 7, 2024 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Overview

Copyright paskal.maksim@gmail.com Licensed under the Apache License, Version 2.0 (the "License") you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Client

type Client struct {
	Endpoint     string
	Token        string
	Organization string
	HTTPClient   *http.Client
}

func NewClient

func NewClient(endpoint string) *Client

func (*Client) GetIssues

func (c *Client) GetIssues(ctx context.Context, query, period, limit string) ([]Issue, error)

Get issues from sentry (WARNING) token must have all teams.

func (c *Client) GetIssuesExternalLink(query, period string) string

func (*Client) GetProjectURL

func (c *Client) GetProjectURL(slug string) string

type Issue

type Issue struct {
	ID        string   `json:"id"`
	Title     string   `json:"title"`
	Culprit   string   `json:"culprit"`
	ShortID   string   `json:"shortId"`
	Level     string   `json:"level"`
	LastSeen  string   `json:"lastSeen"`
	Metadata  Metadata `json:"metadata"`
	PermaLink string   `json:"permalink"`
	Project   Project  `json:"project"`
	SubStatus string   `json:"substatus"`
}

func (*Issue) LastSeenTime

func (i *Issue) LastSeenTime() time.Time

type Metadata

type Metadata struct {
	Type  string `json:"type"`
	Value string `json:"value"`
}

type Project

type Project struct {
	ID   string `json:"id"`
	Name string `json:"name"`
	Slug string `json:"slug"`
}

Jump to

Keyboard shortcuts

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