sentry

package
v0.0.0-...-1425752 Latest Latest
Warning

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

Go to latest
Published: Aug 20, 2020 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Client

type Client interface {
	GetOrganization(ctx context.Context, slug string) (*Organization, *http.Response, error)

	GetTeam(ctx context.Context, org, slug string) (*Team, *http.Response, error)
	CreateTeam(ctx context.Context, org, name, slug string) (*Team, *http.Response, error)
	UpdateTeam(ctx context.Context, org, slug, newName, newSlug string) (*Team, *http.Response, error)
	DeleteTeam(ctx context.Context, org, slug string) (*http.Response, error)

	GetProject(ctx context.Context, org, slug string) (*Project, *http.Response, error)
	CreateProject(ctx context.Context, org, team, name, slug string) (*Project, *http.Response, error)
	UpdateProject(ctx context.Context, org, slug, newName, newSlug string) (*Project, *http.Response, error)
	DeleteProject(ctx context.Context, org, slug string) (*http.Response, error)

	GetClientKeys(ctx context.Context, org, proj string) ([]*ClientKey, *http.Response, error)
	CreateClientKey(ctx context.Context, org, proj, name string) (*ClientKey, *http.Response, error)
	UpdateClientKey(ctx context.Context, org, proj, id, name string) (*http.Response, error)
	DeleteClientKey(ctx context.Context, org, proj, id string) (*http.Response, error)
}

func New

func New(http *http.Client, baseURL *url.URL) Client

type ClientKey

type ClientKey struct {
	ID   string        `json:"id"`
	Name string        `json:"name"`
	DSN  *ClientKeyDSN `json:"dsn"`
}

type ClientKeyDSN

type ClientKeyDSN struct {
	Secret string `json:"secret"`
	Public string `json:"public"`
	CSP    string `json:"csp"`
}

type ErrorResponse

type ErrorResponse struct {
	Response *http.Response
	Body     []byte
}

func (*ErrorResponse) Error

func (e *ErrorResponse) Error() string

type Fake

type Fake struct {
	Orgs       []*Organization
	Teams      []*Team
	Projects   []*Project
	ClientKeys []*ClientKey
}

Fake is a fake implementation of the Client interface.

func (*Fake) CreateClientKey

func (s *Fake) CreateClientKey(ctx context.Context, org, proj, name string) (*ClientKey, *http.Response, error)

func (*Fake) CreateProject

func (s *Fake) CreateProject(ctx context.Context, org, team, name, slug string) (*Project, *http.Response, error)

func (*Fake) CreateTeam

func (s *Fake) CreateTeam(ctx context.Context, org, name, slug string) (*Team, *http.Response, error)

func (*Fake) DeleteClientKey

func (s *Fake) DeleteClientKey(ctx context.Context, org, proj, id string) (*http.Response, error)

func (*Fake) DeleteProject

func (s *Fake) DeleteProject(ctx context.Context, org, slug string) (*http.Response, error)

func (*Fake) DeleteTeam

func (s *Fake) DeleteTeam(ctx context.Context, org, slug string) (*http.Response, error)

func (*Fake) GetClientKeys

func (s *Fake) GetClientKeys(ctx context.Context, org, proj string) ([]*ClientKey, *http.Response, error)

func (*Fake) GetOrganization

func (s *Fake) GetOrganization(ctx context.Context, slug string) (*Organization, *http.Response, error)

func (*Fake) GetProject

func (s *Fake) GetProject(ctx context.Context, org, slug string) (*Project, *http.Response, error)

func (*Fake) GetTeam

func (s *Fake) GetTeam(ctx context.Context, org, slug string) (*Team, *http.Response, error)

func (*Fake) UpdateClientKey

func (s *Fake) UpdateClientKey(ctx context.Context, org, proj, id, name string) (*http.Response, error)

func (*Fake) UpdateProject

func (s *Fake) UpdateProject(ctx context.Context, org, slug, newName, newSlug string) (*Project, *http.Response, error)

func (*Fake) UpdateTeam

func (s *Fake) UpdateTeam(ctx context.Context, org, slug, newName, newSlug string) (*Team, *http.Response, error)

type Organization

type Organization struct {
	Slug string `json:"slug"`
}

type Project

type Project struct {
	Slug string `json:"slug,omitempty"`
	Name string `json:"name,omitempty"`
}

type Team

type Team struct {
	Slug string `json:"slug,omitempty"`
	Name string `json:"name,omitempty"`
}

Jump to

Keyboard shortcuts

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