Documentation ¶
Overview ¶
Copyright 2022 Google LLC
# # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # https://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License.
Copyright 2022 Google LLC
# # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # https://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License.
Copyright 2022 Google LLC
# # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # https://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License.
Copyright 2022 Google LLC
# # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # https://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License.
Copyright 2022 Google LLC
# # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # https://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License.
Copyright 2022 Google LLC
# # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # https://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License.
Copyright 2022 Google LLC
# # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # https://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License.
Copyright 2022 Google LLC
# # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # https://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License.
Index ¶
- type Client
- func (c Client) AddCategory(ctx context.Context, category *models.Category) (*models.Category, error)
- func (c Client) AddItemToCart(ctx context.Context, cartId string, productId string) (bool, error)
- func (c Client) AddProduct(ctx context.Context, product *models.Product) (*models.Product, error)
- func (c Client) AddUser(ctx context.Context, user *models.User) (*models.User, error)
- func (c Client) AddUserAddress(ctx context.Context, userAddress *models.UserAddress) (*models.UserAddress, error)
- func (c Client) AllProducts(ctx context.Context) ([]models.Product, error)
- func (c Client) CloseConnection()
- func (c Client) DeleteCategory(ctx context.Context, ID string) error
- func (c Client) DeleteProduct(ctx context.Context, ID string) error
- func (c Client) DeleteUser(ctx context.Context, ID string) error
- func (c Client) DeleteUserAddress(ctx context.Context, ID string) error
- func (c Client) GetCartInfoByUserID(ctx context.Context, userId string) (*models.Cart, int64, error)
- func (c Client) GetCategoryById(ctx context.Context, ID string) (*models.Category, error)
- func (c Client) GetProductById(ctx context.Context, ID string) (*models.Product, error)
- func (c Client) GetUserAddressById(ctx context.Context, ID string) (*models.UserAddress, error)
- func (c Client) GetUserById(ctx context.Context, ID string) (*models.DisplayUser, error)
- func (c Client) Login(ctx context.Context, user *models.Login) (string, error)
- func (c Client) NewCartForUser(ctx context.Context, cart *models.Cart) (*models.Cart, error)
- func (c Client) OrderList(ctx context.Context, userId string) ([]models.Order, error)
- func (c Client) OrderPlacement(ctx context.Context, userId string) (bool, error)
- func (c Client) Ready() bool
- func (c Client) RunMigration() error
- func (c Client) UpdateCategory(ctx context.Context, category *models.Category) (bool, error)
- func (c Client) UpdateProduct(ctx context.Context, product *models.UpdateProduct, productId string) (*models.Product, error)
- func (c Client) UpdateUser(ctx context.Context, user *models.User) (bool, error)
- func (c Client) UpdateUserAddress(ctx context.Context, userAddress *models.UserAddress) (bool, error)
- type DBClient
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Client ¶
func (Client) AddCategory ¶
func (Client) AddItemToCart ¶
func (Client) AddProduct ¶
func (Client) AddUserAddress ¶
func (c Client) AddUserAddress(ctx context.Context, userAddress *models.UserAddress) (*models.UserAddress, error)
func (Client) AllProducts ¶
func (Client) CloseConnection ¶
func (c Client) CloseConnection()