Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 5 additions & 3 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,11 @@ module github.com/gitpod-io/gitpod-sdk-go
go 1.21

require (
github.com/google/uuid v1.3.0 // indirect
github.com/tidwall/gjson v1.14.4 // indirect
github.com/tidwall/gjson v1.14.4
github.com/tidwall/sjson v1.2.5
)

require (
github.com/tidwall/match v1.1.1 // indirect
github.com/tidwall/pretty v1.2.1 // indirect
github.com/tidwall/sjson v1.2.5 // indirect
)
2 changes: 0 additions & 2 deletions go.sum
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
github.com/google/uuid v1.3.0 h1:t6JiXgmwXMjEs8VusXIJk2BXHsn+wx8BZdTaoZ5fu7I=
github.com/google/uuid v1.3.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo=
github.com/tidwall/gjson v1.14.2/go.mod h1:/wbyibRr2FHMks5tjHJ5F8dMZh3AcwJEMf5vlfC0lxk=
github.com/tidwall/gjson v1.14.4 h1:uo0p8EbA09J7RQaflQ1aBRffTR7xedD2bcIVSYxLnkM=
github.com/tidwall/gjson v1.14.4/go.mod h1:/wbyibRr2FHMks5tjHJ5F8dMZh3AcwJEMf5vlfC0lxk=
Expand Down
22 changes: 22 additions & 0 deletions internal/apierror/error.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
package apierror

import "github.com/gitpod-io/gitpod-sdk-go/shared"

type ErrorCode = shared.ErrorCode

const ErrorCodeCanceled = shared.ErrorCodeCanceled
const ErrorCodeUnknown = shared.ErrorCodeUnknown
const ErrorCodeInvalidArgument = shared.ErrorCodeInvalidArgument
const ErrorCodeDeadlineExceeded = shared.ErrorCodeDeadlineExceeded
const ErrorCodeNotFound = shared.ErrorCodeNotFound
const ErrorCodeAlreadyExists = shared.ErrorCodeAlreadyExists
const ErrorCodePermissionDenied = shared.ErrorCodePermissionDenied
const ErrorCodeResourceExhausted = shared.ErrorCodeResourceExhausted
const ErrorCodeFailedPrecondition = shared.ErrorCodeFailedPrecondition
const ErrorCodeAborted = shared.ErrorCodeAborted
const ErrorCodeOutOfRange = shared.ErrorCodeOutOfRange
const ErrorCodeUnimplemented = shared.ErrorCodeUnimplemented
const ErrorCodeInternal = shared.ErrorCodeInternal
const ErrorCodeUnavailable = shared.ErrorCodeUnavailable
const ErrorCodeDataLoss = shared.ErrorCodeDataLoss
const ErrorCodeUnauthenticated = shared.ErrorCodeUnauthenticated
22 changes: 22 additions & 0 deletions shared/error.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
package shared

type ErrorCode string

const (
ErrorCodeCanceled ErrorCode = "canceled"
ErrorCodeUnknown ErrorCode = "unknown"
ErrorCodeInvalidArgument ErrorCode = "invalid_argument"
ErrorCodeDeadlineExceeded ErrorCode = "deadline_exceeded"
ErrorCodeNotFound ErrorCode = "not_found"
ErrorCodeAlreadyExists ErrorCode = "already_exists"
ErrorCodePermissionDenied ErrorCode = "permission_denied"
ErrorCodeResourceExhausted ErrorCode = "resource_exhausted"
ErrorCodeFailedPrecondition ErrorCode = "failed_precondition"
ErrorCodeAborted ErrorCode = "aborted"
ErrorCodeOutOfRange ErrorCode = "out_of_range"
ErrorCodeUnimplemented ErrorCode = "unimplemented"
ErrorCodeInternal ErrorCode = "internal"
ErrorCodeUnavailable ErrorCode = "unavailable"
ErrorCodeDataLoss ErrorCode = "data_loss"
ErrorCodeUnauthenticated ErrorCode = "unauthenticated"
)
Loading