builtins

package
v0.16.1 Latest Latest
Warning

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

Go to latest
Published: Apr 11, 2024 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Handler

type Handler struct {
	Builtin handlers.HandlerMeta
}

Handler builtinハンドラーをラップし、リクエスト受付時のログ出力を担当するハンドラー

全ての処理をBuiltinに設定されたハンドラーに委譲する

func (*Handler) APICaller

func (h *Handler) APICaller() iaas.APICaller

func (*Handler) GetLogger

func (h *Handler) GetLogger() *slog.Logger

func (*Handler) Handle

func (*Handler) Name

func (h *Handler) Name() string

func (*Handler) PostHandle

func (h *Handler) PostHandle(ctx context.Context, req *handler.PostHandleRequest, sender handlers.ResponseSender) error

func (*Handler) PreHandle

func (h *Handler) PreHandle(ctx context.Context, req *handler.HandleRequest, sender handlers.ResponseSender) error

func (*Handler) SetAPICaller

func (h *Handler) SetAPICaller(caller iaas.APICaller)

func (*Handler) SetLogger

func (h *Handler) SetLogger(logger *slog.Logger)

func (*Handler) Version

func (h *Handler) Version() string

type SakuraCloudAPICaller

type SakuraCloudAPICaller interface {
	APICaller() iaas.APICaller
	SetAPICaller(caller iaas.APICaller)
}

SakuraCloudAPICaller さくらのクラウドAPIを利用するビルトインハンドラ向けのインターフェース

type SakuraCloudAPIClient

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

SakuraCloudAPIClient SakuraCloudAPICallerの実装、各ハンドラーに埋め込んで利用する

func (*SakuraCloudAPIClient) APICaller

func (c *SakuraCloudAPIClient) APICaller() iaas.APICaller

func (*SakuraCloudAPIClient) SetAPICaller

func (c *SakuraCloudAPIClient) SetAPICaller(caller iaas.APICaller)

Jump to

Keyboard shortcuts

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