Documentation
¶
Index ¶
- Variables
- type AuthAppService
- func (a *AuthAppService) HandleCreate(w http.ResponseWriter, r *http.Request)
- func (a *AuthAppService) HandleDelete(w http.ResponseWriter, r *http.Request)
- func (a *AuthAppService) HandleList(w http.ResponseWriter, r *http.Request)
- func (a *AuthAppService) ServeHTTP(w http.ResponseWriter, r *http.Request)
- type AuthAppToken
- type Option
- func Config(val *config.Config) Option
- func Context(val context.Context) Option
- func GatewaySelector(gatewaySelector pool.Selectable[gateway.GatewayAPIClient]) Option
- func Logger(val log.Logger) Option
- func Mux(m *chi.Mux) Option
- func RoleClient(rs settingssvc.RoleService) Option
- func TraceProvider(val trace.TracerProvider) Option
- type Options
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 GatewaySelector ¶
func GatewaySelector(gatewaySelector pool.Selectable[gateway.GatewayAPIClient]) Option
GatewaySelector provides a function to configure the gateway client selector
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.
Click to show internal directories.
Click to hide internal directories.