Documentation ¶
Overview ¶
Code generated by yo. DO NOT EDIT.
Code generated by yo. DO NOT EDIT.
Code generated by yo. DO NOT EDIT.
Code generated by yo. DO NOT EDIT.
Code generated by yo. DO NOT EDIT.
Code generated by yo. DO NOT EDIT.
Code generated by yo. DO NOT EDIT.
Index ¶
- Variables
- func DecodeInto(cols []string, row *spanner.Row, into Decodable) error
- type AllRepository
- type Decodable
- type GroupRepository
- type GroupRepositoryCRUD
- type GroupRepositoryGenerated
- type GroupRepositoryIndexes
- type GroupRepositoryUtil
- type Key
- type KeyRange
- type Params
- type Repository
- type Row
- type Transaction
- type UserGroupRepository
- type UserGroupRepositoryCRUD
- type UserGroupRepositoryGenerated
- type UserGroupRepositoryIndexes
- type UserGroupRepositoryUtil
- type UserRepository
- type UserRepositoryCRUD
- type UserRepositoryGenerated
- type UserRepositoryIndexes
- type UserRepositoryUtil
Constants ¶
This section is empty.
Variables ¶
View Source
var (
ErrNotFound = errors.New("NotFound")
)
Functions ¶
Types ¶
type AllRepository ¶ added in v0.0.2
type AllRepository struct { Group GroupRepository UserGroup UserGroupRepository User UserRepository }
func NewAllRepository ¶ added in v0.0.2
func NewAllRepository(client *spanner.Client) *AllRepository
type GroupRepository ¶
type GroupRepository interface { GroupRepositoryIndexes GroupRepositoryCRUD }
func NewGroupRepository ¶
func NewGroupRepository(client *spanner.Client) GroupRepository
type GroupRepositoryCRUD ¶
type GroupRepositoryCRUD interface { FindAll(ctx context.Context) ([]*model.Group, error) FindAllWithCursor(ctx context.Context, limit int, cursor string) ([]*model.Group, error) CreateGroup(ctx context.Context, name string) (*model.Group, error) CreateOrUpdateGroup(ctx context.Context, groupID string, name string) (*model.Group, error) InsertGroup(ctx context.Context, group *model.Group) (*model.Group, error) InsertOrUpdateGroup(ctx context.Context, group *model.Group) (*model.Group, error) UpdateGroup(ctx context.Context, group *model.Group) error DeleteGroup(ctx context.Context, group *model.Group) error }
type GroupRepositoryGenerated ¶ added in v0.0.2
type GroupRepositoryGenerated interface { GroupRepositoryIndexes GroupRepositoryCRUD GroupRepositoryUtil }
type GroupRepositoryIndexes ¶
type GroupRepositoryUtil ¶ added in v0.0.2
type Repository ¶
type Repository struct {
// contains filtered or unexported fields
}
func (Repository) Transaction ¶
func (r Repository) Transaction(ctx context.Context, fn func(tx Transaction) error) error
type Transaction ¶
type Transaction = *spanner.ReadWriteTransaction
type UserGroupRepository ¶
type UserGroupRepository interface { UserGroupRepositoryIndexes UserGroupRepositoryCRUD }
func NewUserGroupRepository ¶
func NewUserGroupRepository(client *spanner.Client) UserGroupRepository
type UserGroupRepositoryCRUD ¶
type UserGroupRepositoryCRUD interface { FindAll(ctx context.Context) ([]*model.UserGroup, error) CreateUserGroup(ctx context.Context, groupID string, userID string) (*model.UserGroup, error) CreateOrUpdateUserGroup(ctx context.Context, groupID string, userID string) (*model.UserGroup, error) InsertUserGroup(ctx context.Context, userGroup *model.UserGroup) (*model.UserGroup, error) InsertOrUpdateUserGroup(ctx context.Context, userGroup *model.UserGroup) (*model.UserGroup, error) UpdateUserGroup(ctx context.Context, userGroup *model.UserGroup) error DeleteUserGroup(ctx context.Context, userGroup *model.UserGroup) error }
type UserGroupRepositoryGenerated ¶ added in v0.0.2
type UserGroupRepositoryGenerated interface { UserGroupRepositoryIndexes UserGroupRepositoryCRUD UserGroupRepositoryUtil }
type UserGroupRepositoryIndexes ¶
type UserGroupRepositoryIndexes interface { GetUserGroupByGroupIDAndUserID(ctx context.Context, groupID string, userID string) (*model.UserGroup, error) FindUserGroupsByGroupIDsAndUserIDs(ctx context.Context, groupIDs []string, userIDs []string) ([]*model.UserGroup, error) FindUserGroupsByGroupIDs(ctx context.Context, groupIDs []string) ([]*model.UserGroup, error) FindUserGroupsByUserIDs(ctx context.Context, userIDs []string) ([]*model.UserGroup, error) GetUserGroupByGroupID(ctx context.Context, groupID string) (*model.UserGroup, error) GetUserGroupByGroupIDFast(ctx context.Context, groupID string) (*model.UserGroup, error) FindUserGroupsByUserID(ctx context.Context, userID string) ([]*model.UserGroup, error) FindUserGroupsByUserIDFast(ctx context.Context, userID string) ([]*model.UserGroup, error) }
type UserGroupRepositoryUtil ¶ added in v0.0.2
type UserRepository ¶
type UserRepository interface { UserRepositoryIndexes UserRepositoryCRUD }
func NewUserRepository ¶
func NewUserRepository(client *spanner.Client) UserRepository
type UserRepositoryCRUD ¶
type UserRepositoryCRUD interface { FindAll(ctx context.Context) ([]*model.User, error) FindAllWithCursor(ctx context.Context, limit int, cursor string) ([]*model.User, error) CreateUser(ctx context.Context, name string, status int64) (*model.User, error) CreateOrUpdateUser(ctx context.Context, userID string, name string, status int64) (*model.User, error) InsertUser(ctx context.Context, user *model.User) (*model.User, error) InsertOrUpdateUser(ctx context.Context, user *model.User) (*model.User, error) UpdateUser(ctx context.Context, user *model.User) error DeleteUser(ctx context.Context, user *model.User) error }
type UserRepositoryGenerated ¶ added in v0.0.2
type UserRepositoryGenerated interface { UserRepositoryIndexes UserRepositoryCRUD UserRepositoryUtil } //
type UserRepositoryIndexes ¶
type UserRepositoryIndexes interface { GetUserByUserID(ctx context.Context, userID string) (*model.User, error) FindUsersByUserIDs(ctx context.Context, userIDs []string) ([]*model.User, error) FindUsersByName(ctx context.Context, name string) ([]*model.User, error) FindUsersByNameFast(ctx context.Context, name string) ([]*model.User, error) FindUsersByNames(ctx context.Context, names []string) ([]*model.User, error) FindUsersByNameAndStatus(ctx context.Context, name string, status int64) ([]*model.User, error) FindUsersByNameAndStatusFast(ctx context.Context, name string, status int64) ([]*model.User, error) FindUsersByNamesAndStatuses(ctx context.Context, names []string, statuses []int64) ([]*model.User, error) }
type UserRepositoryUtil ¶ added in v0.0.2
type UserRepositoryUtil interface { UserIDs(in []*model.User) []string UserIDToUserMap(in []*model.User) map[string]*model.User Names(in []*model.User) []string NameToUsersMap(in []*model.User) map[string][]*model.User Statuses(in []*model.User) []int64 StatusToUsersMap(in []*model.User) map[int64][]*model.User }
Click to show internal directories.
Click to hide internal directories.