Versions in this module Expand all Collapse all v1 v1.0.1 Jan 30, 2026 v1.0.0 Jan 28, 2026 Changes in this version + var ContainerItemNotFoundErr error = errors.New("no matching item found") + func DoJSONRequestWithBodyAndResult[TBody any, TResult any](client *http.Client, method string, url string, body TBody, token string) (TResult, error) + func DoJSONRequestWithBody[TBody any](client *http.Client, method string, url string, body TBody, token string) error + func DoJSONRequestWithResult[TResult any](client *http.Client, method string, url string, token string) (TResult, error) + func DoRequest(httpClient *http.Client, request *http.Request) (*http.Response, error) + func GetBearerToken(r *http.Request) (string, error) + func GetItem[DesiredType any, T any](c Container[T]) (DesiredType, error) + func GetRepository[TRepo database.Repository](c RepositoryContainer) (TRepo, error) + func MustGetRepository[TRepo database.Repository](c RepositoryContainer) TRepo + func ParseJsonRequestBody[T any](request *http.Request) (T, error) + func ParseJsonResponseBody[T any](response *http.Response) (T, error) + func ReturnError(w http.ResponseWriter, err error) (int, error) + func ReturnResponse(w http.ResponseWriter, data any) (int, error) + func ReturnResponseWithCode(w http.ResponseWriter, data any, code int) (int, error) + func Token(request *http.Request) string + func ValidateToken(token string) error + type AuthorizationHeaders map[string]string + func GetAuthorizationHeaders(request *http.Request) AuthorizationHeaders + type Container interface + Append func(key string, item T) + Delete func(key string) + Get func(key string) T + List func() []T + func NewContainer[T any]() Container[T] + type RepositoryContainer interface + func NewRepositoryContainer() RepositoryContainer