rpc

package
v1.2.0 Latest Latest
Warning

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

Go to latest
Published: Dec 22, 2024 License: MIT Imports: 24 Imported by: 0

Documentation

Overview

Copyright (c) 2024 Eli Janssen Use of this source code is governed by an MIT-style license that can be found in the LICENSE file.

Copyright (c) 2024 Eli Janssen Use of this source code is governed by an MIT-style license that can be found in the LICENSE file.

Copyright (c) 2024 Eli Janssen Use of this source code is governed by an MIT-style license that can be found in the LICENSE file.

Copyright (c) 2024 Eli Janssen Use of this source code is governed by an MIT-style license that can be found in the LICENSE file.

Copyright (c) 2024 Eli Janssen Use of this source code is governed by an MIT-style license that can be found in the LICENSE file.

Copyright (c) 2024 Eli Janssen Use of this source code is governed by an MIT-style license that can be found in the LICENSE file.

Copyright (c) 2024 Eli Janssen Use of this source code is governed by an MIT-style license that can be found in the LICENSE file.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AuthError added in v1.1.0

func AuthError(msg string) *connect.Error

func InternalError added in v1.1.0

func InternalError(msg string) *connect.Error

func RequireApiKey added in v1.1.0

func RequireApiKey(up GetUserProvider, opts ...connect.HandlerOption) func(http.Handler) http.Handler

Types

type GetUserProvider

type GetUserProvider interface {
	GetUserByApiKey(context.Context, string) (*model.User, errs.Error)
}

type Options

type Options struct {
	Db           model.PgxHandle   `validate:"required"`
	Redis        *redis.Client     `validate:"required"`
	Templates    resources.TGetter `validate:"required"`
	Mailer       mail.MailSender   `validate:"required"`
	HMACKeyBytes []byte            `validate:"required"`
	BaseURL      string            `validate:"required"`
	IsProd       bool
}

type Server

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

func New

func New(opts Options) (*Server, error)

func (*Server) EarmarkCreate added in v1.0.1

func (*Server) EarmarkGetDetails added in v1.0.1

func (*Server) EarmarkRemove added in v1.0.1

func (*Server) EarmarksList added in v1.0.1

func (*Server) EventAddItem added in v1.0.1

func (*Server) EventCreate added in v1.0.1

func (*Server) EventDelete added in v1.0.1

func (*Server) EventGetDetails added in v1.0.1

func (*Server) EventListEarmarks added in v1.0.1

func (*Server) EventListItems added in v1.0.1

func (*Server) EventRemoveItem added in v1.0.1

func (*Server) EventUpdate added in v1.0.1

func (*Server) EventUpdateItem added in v1.0.1

func (*Server) EventsList added in v1.0.1

func (*Server) FavoriteAdd added in v1.0.1

func (*Server) FavoriteListEvents added in v1.0.1

func (*Server) FavoriteRemove added in v1.0.1

func (*Server) GenHandler

func (s *Server) GenHandler() http.Handler

func (*Server) NotificationDelete added in v1.0.1

func (*Server) NotificationsDeleteAll added in v1.0.1

func (*Server) NotificationsList added in v1.0.1

Jump to

Keyboard shortcuts

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