rpc

package
v1.0.1 Latest Latest
Warning

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

Go to latest
Published: Jun 24, 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) EarmarkCreate added in v1.0.1

func (*Server) EarmarkGetDetails added in v1.0.1

func (*Server) EarmarkRemove added in v1.0.1

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

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 (s *Server) EventDelete(ctx context.Context,
	r *icbt.EventDeleteRequest,
) (*icbt.Empty, error)

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 (s *Server) EventRemoveItem(ctx context.Context,
	r *icbt.EventRemoveItemRequest,
) (*icbt.Empty, error)

func (*Server) EventUpdate added in v1.0.1

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

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 (s *Server) FavoriteRemove(ctx context.Context,
	r *icbt.FavoriteRemoveRequest,
) (*icbt.Empty, error)

func (*Server) GenHandler

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

func (*Server) NotificationDelete added in v1.0.1

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

func (*Server) NotificationsDeleteAll added in v1.0.1

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

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