GitXplorerGitXplorer
a

go-sentry-api

public
50 stars
37 forks
10 issues

Commits

List of commits on branch master.
Verified
9b36a57e13a36b667fe09c1e75a6d3e47a8d9708

Merge pull request #23 from atlassian/renovate/configure

ccwood committed 4 hours ago
Verified
596f30f0fdd7c820803bd2cfbe31fa78ecb92764

Merge pull request #42 from atlassian/cwood/cleanup

ccwood committed 4 hours ago
Unverified
665937481f99a16eef3d1b9cdabb33d1da43faa3

Cleanup and fix badge

ccwood committed 5 hours ago
Verified
88422d7b81a4c975d8d013109d6b49b1d76c0226

Add renovate.json

rrenovate[bot] committed 9 months ago
Verified
3bb2fb7a76d01bf755d87d182bfc8ff54424f43f

Merge pull request #39 from degzhaus/degzhaus/fetch_user_roles

ccwood committed a year ago
Unverified
b73c4d3869f3ea129be3a82d12f96c9f3d6d1d12

Fetch user roles

ddegzhaus committed 2 years ago

README

The README file for this repository.

Go Sentry API

Go Reference

This is a library that implements a client in go for the sentry api. It supports all the endpoints and can do a good bit. For a full reference you can check the godoc link above.

Usage

Initialization and Create New DSN Key

import (
	"fmt"

	"github.com/atlassian/go-sentry-api"
)
// Auth token is always required, secondary is endpoint and third is timeout defaults 60 seconds
client, _:= sentry.NewClient("yourauthtokengoeshere", nil, nil)

// Fetch your organization
org, err := client.GetOrganization("sentry")
if err != nil {
	panic(err)
}

// Fetch a project you already made
project, err := client.GetProject(org, "my-project-slug")
if err != nil {
	panic(err)
}

// Create a new Client DSN via the API
key, err := client.CreateClientKey(org, project, "example-dsn")
if err != nil {
	panic(err)
}
fmt.Printf(key.DSN.Secret)

Installation

go get github.com/atlassian/go-sentry-api

Documentation

Go Reference

Tests

To run tests you can setup a local sentry instance via docker. There is a makefile command called make devenv which will setup all of the containers.

Once complete you can then setup a environment var of SENTRY_AUTHTOKEN and then run make test which should go through and create and run all tests aginst localhost:8080

Contributors

Pull requests, issues and comments welcome. For pull requests:

  • Add tests for new features and bug fixes
  • Follow the existing style
  • Separate unrelated changes into multiple pull requests

See the existing issues for things to start contributing. For bigger changes, make sure you start a discussion first by creating an issue and explaining the intended change. Atlassian requires contributors to sign a Contributor License Agreement, known as a CLA. This serves as a record stating that the contributor is entitled to contribute the code/documentation/translation to the project and is willing to have it used in distributions and derivative works (or is willing to transfer ownership).

Prior to accepting your contributions we ask that you please follow the appropriate link below to digitally sign the CLA. The Corporate CLA is for those who are contributing as a member of an organization and the individual CLA is for those contributing as an individual.

License

Copyright (c) 2017 Atlassian and others. Apache 2.0 licensed, see LICENSE.txt file.