service

package
v1.1.0 Latest Latest
Warning

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

Go to latest
Published: Mar 18, 2025 License: Apache-2.0 Imports: 24 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrBadRequest = errors.New("bad request")

Functions

This section is empty.

Types

type AuthAppService

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

AuthAppService defines the service interface.

func NewAuthAppService

func NewAuthAppService(opts ...Option) (*AuthAppService, error)

NewAuthAppService initializes a new AuthAppService.

func (*AuthAppService) HandleCreate

func (a *AuthAppService) HandleCreate(w http.ResponseWriter, r *http.Request)

HandleCreate handles the creation of app tokens

func (*AuthAppService) HandleDelete

func (a *AuthAppService) HandleDelete(w http.ResponseWriter, r *http.Request)

HandleDelete handles deletion of app tokens

func (*AuthAppService) HandleList

func (a *AuthAppService) HandleList(w http.ResponseWriter, r *http.Request)

HandleList handles listing of app tokens

func (*AuthAppService) ServeHTTP

func (a *AuthAppService) ServeHTTP(w http.ResponseWriter, r *http.Request)

ServeHTTP implements the http.Handler interface.

type AuthAppToken

type AuthAppToken struct {
	Token          string    `json:"token"`
	ExpirationDate time.Time `json:"expiration_date"`
	CreatedDate    time.Time `json:"created_date"`
	Label          string    `json:"label"`
}

AuthAppToken represents an app token.

type Option

type Option func(o *Options)

Option defines a single option function.

func Config

func Config(val *config.Config) Option

Config provides a function to set the config option.

func Context

func Context(val context.Context) Option

Context provides a function to set the context option.

func GatewaySelector

func GatewaySelector(gatewaySelector pool.Selectable[gateway.GatewayAPIClient]) Option

GatewaySelector provides a function to configure the gateway client selector

func Logger

func Logger(val log.Logger) Option

Logger provides a function to set the logger option.

func Mux

func Mux(m *chi.Mux) Option

Mux defines the muxer for the userlog service

func RoleClient

func RoleClient(rs settingssvc.RoleService) Option

RoleClient adds a grpc client for the role service

func TraceProvider

func TraceProvider(val trace.TracerProvider) Option

TraceProvider provides a function to set the TracerProvider option

type Options

type Options struct {
	Logger          log.Logger
	Context         context.Context
	Config          *config.Config
	GatewaySelector pool.Selectable[gateway.GatewayAPIClient]
	Mux             *chi.Mux
	TracerProvider  trace.TracerProvider
	RoleClient      settingssvc.RoleService
}

Options defines the available options for this package.

Jump to

Keyboard shortcuts

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