rpc

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: May 18, 2024 License: MIT Imports: 18 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 AuthHook

func AuthHook(up GetUserProvider) func(context.Context) (context.Context, error)

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) AddEventItem

func (*Server) AddFavorite

func (*Server) CreateEarmark

func (*Server) CreateEvent

func (*Server) DeleteAllNotifications

func (s *Server) DeleteAllNotifications(ctx context.Context,
	r *icbt.Empty,
) (*icbt.Empty, error)

func (*Server) DeleteEvent

func (s *Server) DeleteEvent(ctx context.Context,
	r *icbt.DeleteEventRequest,
) (*icbt.Empty, error)

func (*Server) DeleteNotification

func (s *Server) DeleteNotification(ctx context.Context,
	r *icbt.DeleteNotificationRequest,
) (*icbt.Empty, error)

func (*Server) GenHandler

func (s *Server) GenHandler(prefix string) icbt.TwirpServer

func (*Server) GetEarmarkDetails

func (*Server) GetEventDetails

func (*Server) ListEarmarks

func (*Server) ListEventEarmarks

func (*Server) ListEventItems

func (*Server) ListEvents

func (*Server) ListFavoriteEvents

func (*Server) ListNotifications

func (*Server) RemoveEarmark

func (s *Server) RemoveEarmark(ctx context.Context,
	r *icbt.RemoveEarmarkRequest,
) (*icbt.Empty, error)

func (*Server) RemoveEventItem

func (s *Server) RemoveEventItem(ctx context.Context,
	r *icbt.RemoveEventItemRequest,
) (*icbt.Empty, error)

func (*Server) RemoveFavorite

func (s *Server) RemoveFavorite(ctx context.Context,
	r *icbt.RemoveFavoriteRequest,
) (*icbt.Empty, error)

func (*Server) UpdateEvent

func (s *Server) UpdateEvent(ctx context.Context,
	r *icbt.UpdateEventRequest,
) (*icbt.Empty, error)

func (*Server) UpdateEventItem

Jump to

Keyboard shortcuts

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