v1

package
v0.0.0-...-c2300e3 Latest Latest
Warning

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

Go to latest
Published: Dec 28, 2023 License: Apache-2.0 Imports: 28 Imported by: 0

Documentation

Overview

Package v1 manages the different versions of the API.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func APIMux

func APIMux(cfg APIMuxConfig, options ...func(opts *Options)) (http.Handler, error)

APIMux constructs a http.Handler with all application routes defined.

func WithCORS

func WithCORS(origin string) func(opts *Options)

WithCORS provides configuration options for CORS.

Types

type APIMuxConfig

type APIMuxConfig struct {
	Build    string
	Shutdown chan os.Signal
	Log      *logger.Logger
	Auth     *auth.Auth
	DB       *sqlx.DB
	Tracer   trace.Tracer
	KeyID    string
	SMS      *sms.SMS
}

APIMuxConfig contains all the mandatory systems required by handlers.

type Options

type Options struct {
	// contains filtered or unexported fields
}

Options represent optional parameters.

Directories

Path Synopsis
handlers
checkgrp
Package checkgrp maintains the group of handlers for health checking.
Package checkgrp maintains the group of handlers for health checking.
divisiongrp
Package divisiongrp ...
Package divisiongrp ...
usergrp
Package usergrp maintains the group of handlers for user access.
Package usergrp maintains the group of handlers for user access.
Package paging provides support for query paging.
Package paging provides support for query paging.

Jump to

Keyboard shortcuts

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