common

package
v0.0.0-...-c8397cc Latest Latest
Warning

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

Go to latest
Published: Jul 28, 2024 License: MIT Imports: 13 Imported by: 0

Documentation

Index

Constants

View Source
const (
	REQUEST_CTX_USER = "user"

	COOKIE_TOKEN_NAME = "go_twitter_auth_token"
)

Variables

This section is empty.

Functions

func Err

func Err(err error) slog.Attr

func Init

func Init(ctx context.Context, service string) *sdktrace.TracerProvider

Init returns an instance of Jaeger Tracer.

func SendResponse

func SendResponse(w http.ResponseWriter, code int, message string, data interface{})

func SetupLogger

func SetupLogger(env string) *slog.Logger

Types

type Response

type Response struct {
	Code    int         `json:"code"`
	Message string      `json:"message"`
	Data    interface{} `json:"data"`
}

func NewResponse

func NewResponse(code int, message string, data interface{}) *Response

Directories

Path Synopsis
storage
pg

Jump to

Keyboard shortcuts

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