api

package
v0.0.0-...-4350bb9 Latest Latest
Warning

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

Go to latest
Published: Dec 29, 2020 License: MIT Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type APIClient

type APIClient interface {
	Authentication(ctx context.Context) (*user.User, error)
	ShowUser(ctx context.Context, userID string) (*user.User, error)
	UserExists(ctx context.Context, userID string) (bool, error)
	CreateUnauthorizedUser(ctx context.Context, name string, thumbnail string) (*user.User, error)
	AddGroup(ctx context.Context, userID string, groupID string) (*user.User, error)
	RemoveGroup(ctx context.Context, userID string, groupID string) (*user.User, error)
	AddHiddenGroup(ctx context.Context, groupID string) (*user.User, error)
	RemoveHiddenGroup(ctx context.Context, groupID string) (*user.User, error)
	ShowExchangeRates(ctx context.Context) (*exchange.ExchangeRates, error)
}

APIClient - 他のAPI操作用インターフェース

func NewAPIClient

func NewAPIClient(userAPIURL string) APIClient

NewAPIClient - API Clientの初期化

type Client

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

Client - 他のAPI管理用の構造体

func (*Client) AddGroup

func (c *Client) AddGroup(ctx context.Context, userID string, groupID string) (*user.User, error)

AddGroup - ユーザーをグループに追加

func (*Client) AddHiddenGroup

func (c *Client) AddHiddenGroup(ctx context.Context, groupID string) (*user.User, error)

AddHiddenGroup - 非公開のグループ一覧に追加

func (*Client) Authentication

func (c *Client) Authentication(ctx context.Context) (*user.User, error)

Authentication - ログインユーザー情報の取得

func (*Client) CreateUnauthorizedUser

func (c *Client) CreateUnauthorizedUser(ctx context.Context, name string, thumbnail string) (*user.User, error)

CreateUnauthorizedUser - 認証機能なしのユーザ作成

func (*Client) RemoveGroup

func (c *Client) RemoveGroup(ctx context.Context, userID string, groupID string) (*user.User, error)

RemoveGroup - ユーザーをグループから削除

func (*Client) RemoveHiddenGroup

func (c *Client) RemoveHiddenGroup(ctx context.Context, groupID string) (*user.User, error)

RemoveHiddenGroup - 非公開のグループ一覧から削除

func (*Client) ShowExchangeRates

func (c *Client) ShowExchangeRates(ctx context.Context) (*exchange.ExchangeRates, error)

ShowExchangeRates - 為替レート取得

func (*Client) ShowUser

func (c *Client) ShowUser(ctx context.Context, userID string) (*user.User, error)

ShowUser - ユーザー情報取得

func (*Client) UserExists

func (c *Client) UserExists(ctx context.Context, userID string) (bool, error)

UserExists - ユーザーの存在性検証

Jump to

Keyboard shortcuts

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