Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

service: account #4

Merged
merged 1 commit into from
Mar 23, 2022
Merged

Conversation

yamamoto-febc
Copy link
Member

サイトアカウントに対するCreate / Read / Delete / List操作を提供する。

    func (s *Service) Create(req *CreateRequest) (*v1.Account, error)
    func (s *Service) CreateWithContext(ctx context.Context, req *CreateRequest) (*v1.Account, error)

    func (s *Service) Delete(req *DeleteRequest) error
    func (s *Service) DeleteWithContext(ctx context.Context, req *DeleteRequest) error

    func (s *Service) Find(req *FindRequest) ([]*v1.Account, error)
    func (s *Service) FindWithContext(ctx context.Context, req *FindRequest) ([]*v1.Account, error)

    func (s *Service) Read(req *ReadRequest) (*v1.Account, error)
    func (s *Service) ReadWithContext(ctx context.Context, req *ReadRequest) (*v1.Account, error)

Note: アカウントキー関連の操作は別サービス(別パッケージ)として提供する。

Note: object-storage-api-goのレベルではサイトに対してアカウントは1つしか持てないため、Find/Readの区別はなく、アカウントのIDを受け取るようなインターフェースは提供していない。
object-storage-service-goでは他のサービスとインターフェースを揃えるために上記をラップしたインターフェースを提供する。

@yamamoto-febc yamamoto-febc merged commit 8a98715 into sacloud:main Mar 23, 2022
@yamamoto-febc yamamoto-febc deleted the service/account branch March 23, 2022 13:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant