mirror of
https://github.com/superseriousbusiness/gotosocial.git
synced 2025-11-07 11:59:30 -06:00
Update dependencies:
- github.com/gin-gonic/gin v1.10.0 -> v1.10.1
- github.com/gin-contrib/sessions v1.10.3 -> v1.10.4
- github.com/jackc/pgx/v5 v5.7.4 -> v5.7.5
- github.com/minio/minio-go/v7 v7.0.91 -> v7.0.92
- github.com/pquerna/otp v1.4.0 -> v1.5.0
- github.com/tdewolff/minify/v2 v2.23.5 -> v2.23.8
- github.com/yuin/goldmark v1.7.11 -> v1.7.12
- go.opentelemetry.io/otel{,/*} v1.35.0 -> v1.36.0
- modernc.org/sqlite v1.37.0 -> v1.37.1
Reviewed-on: https://codeberg.org/superseriousbusiness/gotosocial/pulls/4188
Reviewed-by: Daenney <daenney@noreply.codeberg.org>
Co-authored-by: kim <grufwub@gmail.com>
Co-committed-by: kim <grufwub@gmail.com>
42 lines
1.2 KiB
Go
42 lines
1.2 KiB
Go
// Copyright The OpenTelemetry Authors
|
|
// SPDX-License-Identifier: Apache-2.0
|
|
|
|
package telemetry // import "go.opentelemetry.io/otel/trace/internal/telemetry"
|
|
|
|
// StatusCode is the status of a Span.
|
|
//
|
|
// For the semantics of status codes see
|
|
// https://github.com/open-telemetry/opentelemetry-specification/blob/main/specification/trace/api.md#set-status
|
|
type StatusCode int32
|
|
|
|
const (
|
|
// StatusCodeUnset is the default status.
|
|
StatusCodeUnset StatusCode = 0
|
|
// StatusCodeOK is used when the Span has been validated by an Application
|
|
// developer or Operator to have completed successfully.
|
|
StatusCodeOK StatusCode = 1
|
|
// StatusCodeError is used when the Span contains an error.
|
|
StatusCodeError StatusCode = 2
|
|
)
|
|
|
|
var statusCodeStrings = []string{
|
|
"Unset",
|
|
"OK",
|
|
"Error",
|
|
}
|
|
|
|
func (s StatusCode) String() string {
|
|
if s >= 0 && int(s) < len(statusCodeStrings) {
|
|
return statusCodeStrings[s]
|
|
}
|
|
return "<unknown telemetry.StatusCode>"
|
|
}
|
|
|
|
// Status defines a logical error model that is suitable for different
|
|
// programming environments, including REST APIs and RPC APIs.
|
|
type Status struct {
|
|
// A developer-facing human readable error message.
|
|
Message string `json:"message,omitempty"`
|
|
// The status code.
|
|
Code StatusCode `json:"code,omitempty"`
|
|
}
|