Documentation ¶
Overview ¶
@generated
@generated
@generated
Index ¶
- Variables
- type HandlerImpl
- func (h *HandlerImpl) Count(ctx context.Context, params arguments.UserCount) (int64, error)
- func (h *HandlerImpl) Delete(ctx context.Context, param arguments.UserDelete) (int64, error)
- func (h *HandlerImpl) GetByID(ctx context.Context, params arguments.UserGetByID) (models.User, error)
- func (h *HandlerImpl) GetByIDs(ctx context.Context, params arguments.UserGetByIDs) ([]models.User, error)
- func (h *HandlerImpl) Insert(ctx context.Context, params arguments.UserInsert) (models.User, error)
- func (h *HandlerImpl) List(ctx context.Context, params arguments.UserList) ([]models.User, error)
- func (h *HandlerImpl) Login(ctx context.Context, param arguments.UserLogin) (string, error)
- func (h *HandlerImpl) Update(ctx context.Context, params arguments.UserUpdate) (models.User, error)
- type ICoreHandler
- type ICoreRepository
- type IDatabase
- type IHandler
- type IRepository
- type RepositoryImpl
- func (r *RepositoryImpl) Count(ctx context.Context, params arguments.UserCount) (int64, error)
- func (r *RepositoryImpl) Delete(ctx context.Context, params arguments.UserDelete) (int64, error)
- func (r *RepositoryImpl) GetByID(ctx context.Context, params arguments.UserGetByID) (models.User, error)
- func (r *RepositoryImpl) GetByIDs(ctx context.Context, params arguments.UserGetByIDs) ([]models.User, error)
- func (r *RepositoryImpl) GetByUsername(ctx context.Context, username string) (models.User, error)
- func (r *RepositoryImpl) Insert(ctx context.Context, params arguments.UserInsert) (models.User, error)
- func (r *RepositoryImpl) List(ctx context.Context, params arguments.UserList) ([]models.User, error)
- func (r *RepositoryImpl) Update(ctx context.Context, params arguments.UserUpdate) (models.User, error)
- type ResolverImpl
- func (r *ResolverImpl) Count(params graphql.ResolveParams) (interface{}, error)
- func (r *ResolverImpl) GetByID(param graphql.ResolveParams) (interface{}, error)
- func (r *ResolverImpl) Insert(params graphql.ResolveParams) (interface{}, error)
- func (r *ResolverImpl) List(params graphql.ResolveParams) (interface{}, error)
- func (r *ResolverImpl) Login(param graphql.ResolveParams) (interface{}, error)
- func (r *ResolverImpl) Update(params graphql.ResolveParams) (interface{}, error)
Constants ¶
This section is empty.
Variables ¶
View Source
var ( // Type ... Type = graphql.NewObject(graphql.ObjectConfig{ Name: "User", Description: "This is type Feature", Fields: graphql.Fields{ "id": &graphql.Field{ Type: graphql.NewNonNull(graphql.Int), Description: "This is user's id", }, "username": &graphql.Field{ Type: graphql.NewNonNull(graphql.String), Description: "This is user's username", }, "password": &graphql.Field{ Type: graphql.NewNonNull(graphql.String), Description: "This is user's password", }, "name": &graphql.Field{ Type: graphql.NewNonNull(graphql.String), Description: "This is user's name", }, "dateOfBirth": &graphql.Field{ Type: customgraphql.NullDateTime, Description: "This is user's name", }, "reference": &graphql.Field{ Type: graphql.NewNonNull(graphql.String), Description: "This is user's reference", }, "avatarUrl": &graphql.Field{ Type: graphql.NewNonNull(graphql.String), Description: "This is user's avatar url", }, "licenseNumber": &graphql.Field{ Type: graphql.NewNonNull(graphql.String), Description: "This is user's license number", }, "phoneNumber": &graphql.Field{ Type: graphql.NewNonNull(graphql.String), Description: "This is user's name", }, "extension": &graphql.Field{ Type: graphql.NewNonNull(graphql.String), Description: "This is user's extension", }, "telProvider": &graphql.Field{ Type: graphql.NewNonNull(graphql.String), Description: "This is user's tel provider", }, "telApi": &graphql.Field{ Type: graphql.NewNonNull(graphql.String), Description: "This is user's tel api", }, "supervisorId": &graphql.Field{ Type: graphql.NewNonNull(graphql.Int), Description: "This is user's tel supervisorId", }, "roleId": &graphql.Field{ Type: graphql.NewNonNull(graphql.Int), Description: "This is user's tel RoleID", }, "companyId": &graphql.Field{ Type: graphql.NewNonNull(graphql.Int), Description: "This is user's companyId", }, "status": &graphql.Field{ Type: graphql.NewNonNull(graphql.String), Description: "This is user's status", }, "createdBy": &graphql.Field{ Type: graphql.String, Description: "This is user's createdBy", }, "updatedBy": &graphql.Field{ Type: graphql.String, Description: "This is user's updatedBy", }, }, }) // GetByIDTypeArgs ... GetByIDTypeArgs = graphql.FieldConfigArgument{ "id": &graphql.ArgumentConfig{ Type: graphql.NewNonNull(graphql.Int), }, } // ListTypeArgs ... ListTypeArgs = graphql.FieldConfigArgument{ "id": &graphql.ArgumentConfig{ Type: graphql.Int, Description: "This is user's id", }, "username": &graphql.ArgumentConfig{ Type: graphql.String, Description: "This is user's username", }, "password": &graphql.ArgumentConfig{ Type: graphql.String, Description: "This is user's password", }, "name": &graphql.ArgumentConfig{ Type: graphql.String, Description: "This is user's name", }, "dateOfBirth": &graphql.ArgumentConfig{ Type: customgraphql.NullDateTime, Description: "This is user's name", }, "reference": &graphql.ArgumentConfig{ Type: graphql.String, Description: "This is user's reference", }, "avatarUrl": &graphql.ArgumentConfig{ Type: graphql.String, Description: "This is user's avatar url", }, "licenseNumber": &graphql.ArgumentConfig{ Type: graphql.String, Description: "This is user's license number", }, "phoneNumber": &graphql.ArgumentConfig{ Type: graphql.String, Description: "This is user's name", }, "extension": &graphql.ArgumentConfig{ Type: graphql.String, Description: "This is user's extension", }, "telProvider": &graphql.ArgumentConfig{ Type: graphql.String, Description: "This is user's tel provider", }, "telApi": &graphql.ArgumentConfig{ Type: graphql.String, Description: "This is user's tel api", }, "supervisorId": &graphql.ArgumentConfig{ Type: graphql.Int, Description: "This is user's tel supervisorId", }, "roleId": &graphql.ArgumentConfig{ Type: graphql.Int, Description: "This is user's tel RoleID", }, "companyId": &graphql.ArgumentConfig{ Type: graphql.Int, Description: "This is user's companyId", }, "status": &graphql.ArgumentConfig{ Type: graphql.String, Description: "This is user's status", }, "createdBy": &graphql.ArgumentConfig{ Type: graphql.String, Description: "This is user's createdBy", }, "updatedBy": &graphql.ArgumentConfig{ Type: graphql.String, Description: "This is user's updatedBy", }, "beginId": &graphql.ArgumentConfig{ Type: graphql.Int, Description: "This is ID greater than", DefaultValue: 0, }, "endId": &graphql.ArgumentConfig{ Type: graphql.Int, Description: "This is ID less than", DefaultValue: 0, }, "pageSize": &graphql.ArgumentConfig{ Type: graphql.Int, Description: "This is feature pageSize", DefaultValue: 10, }, } // InsertTypeArgs ... InsertTypeArgs = graphql.FieldConfigArgument{ "username": &graphql.ArgumentConfig{ Type: graphql.NewNonNull(graphql.String), Description: "This is user's username", }, "password": &graphql.ArgumentConfig{ Type: graphql.NewNonNull(graphql.String), Description: "This is user's password", }, "name": &graphql.ArgumentConfig{ Type: graphql.NewNonNull(graphql.String), Description: "This is user's name", }, "dateOfBirth": &graphql.ArgumentConfig{ Type: customgraphql.NullDateTime, Description: "This is user's name", }, "reference": &graphql.ArgumentConfig{ Type: graphql.NewNonNull(graphql.String), Description: "This is user's reference", }, "avatarUrl": &graphql.ArgumentConfig{ Type: graphql.NewNonNull(graphql.String), Description: "This is user's avatar url", }, "licenseNumber": &graphql.ArgumentConfig{ Type: graphql.NewNonNull(graphql.String), Description: "This is user's license number", }, "phoneNumber": &graphql.ArgumentConfig{ Type: graphql.NewNonNull(graphql.String), Description: "This is user's name", }, "extension": &graphql.ArgumentConfig{ Type: graphql.NewNonNull(graphql.String), Description: "This is user's extension", }, "telProvider": &graphql.ArgumentConfig{ Type: graphql.NewNonNull(graphql.String), Description: "This is user's tel provider", }, "telApi": &graphql.ArgumentConfig{ Type: graphql.NewNonNull(graphql.String), Description: "This is user's tel api", }, "supervisorId": &graphql.ArgumentConfig{ Type: graphql.NewNonNull(graphql.Int), Description: "This is user's tel supervisorId", }, "roleId": &graphql.ArgumentConfig{ Type: graphql.NewNonNull(graphql.Int), Description: "This is user's tel RoleID", }, "companyId": &graphql.ArgumentConfig{ Type: graphql.NewNonNull(graphql.Int), Description: "This is user's companyId", }, "status": &graphql.ArgumentConfig{ Type: graphql.NewNonNull(graphql.String), Description: "This is user's status", }, "createdBy": &graphql.ArgumentConfig{ Type: graphql.String, Description: "This is user's createdBy", }, "updatedBy": &graphql.ArgumentConfig{ Type: graphql.String, Description: "This is user's updatedBy", }, } // UpdateTypeArgs ... UpdateTypeArgs = graphql.FieldConfigArgument{ "id": &graphql.ArgumentConfig{ Type: graphql.NewNonNull(graphql.Int), }, "username": &graphql.ArgumentConfig{ Type: graphql.String, Description: "This is user's username", }, "password": &graphql.ArgumentConfig{ Type: graphql.String, Description: "This is user's password", }, "name": &graphql.ArgumentConfig{ Type: graphql.String, Description: "This is user's name", }, "dateOfBirth": &graphql.ArgumentConfig{ Type: customgraphql.NullDateTime, Description: "This is user's name", }, "reference": &graphql.ArgumentConfig{ Type: graphql.String, Description: "This is user's reference", }, "avatarUrl": &graphql.ArgumentConfig{ Type: graphql.String, Description: "This is user's avatar url", }, "licenseNumber": &graphql.ArgumentConfig{ Type: graphql.String, Description: "This is user's license number", }, "phoneNumber": &graphql.ArgumentConfig{ Type: graphql.String, Description: "This is user's name", }, "extension": &graphql.ArgumentConfig{ Type: graphql.String, Description: "This is user's extension", }, "telProvider": &graphql.ArgumentConfig{ Type: graphql.String, Description: "This is user's tel provider", }, "telApi": &graphql.ArgumentConfig{ Type: graphql.String, Description: "This is user's tel api", }, "supervisorId": &graphql.ArgumentConfig{ Type: graphql.Int, Description: "This is user's tel supervisorId", }, "roleId": &graphql.ArgumentConfig{ Type: graphql.Int, Description: "This is user's tel RoleID", }, "companyId": &graphql.ArgumentConfig{ Type: graphql.Int, Description: "This is user's companyId", }, "status": &graphql.ArgumentConfig{ Type: graphql.String, Description: "This is user's status", }, "createdBy": &graphql.ArgumentConfig{ Type: graphql.String, Description: "This is user's createdBy", }, "updatedBy": &graphql.ArgumentConfig{ Type: graphql.String, Description: "This is user's updatedBy", }, } )
View Source
var ( // LoginTypeArgs ... LoginTypeArgs = graphql.FieldConfigArgument{ "username": &graphql.ArgumentConfig{ Type: graphql.NewNonNull(graphql.String), }, "password": &graphql.ArgumentConfig{ Type: graphql.NewNonNull(graphql.String), }, } )
Functions ¶
This section is empty.
Types ¶
type HandlerImpl ¶
type HandlerImpl struct {
// contains filtered or unexported fields
}
HandlerImpl ...
func NewHandler ¶
func NewHandler(user IRepository, permission permission.IHandler, rolePermission rolepermission.IHandler) *HandlerImpl
NewHandler ...
func (*HandlerImpl) Delete ¶
func (h *HandlerImpl) Delete(ctx context.Context, param arguments.UserDelete) (int64, error)
Delete ...
func (*HandlerImpl) GetByID ¶
func (h *HandlerImpl) GetByID(ctx context.Context, params arguments.UserGetByID) (models.User, error)
GetByID ...
func (*HandlerImpl) GetByIDs ¶
func (h *HandlerImpl) GetByIDs(ctx context.Context, params arguments.UserGetByIDs) ([]models.User, error)
GetByIDs ...
func (*HandlerImpl) Insert ¶
func (h *HandlerImpl) Insert(ctx context.Context, params arguments.UserInsert) (models.User, error)
Insert ...
func (*HandlerImpl) Update ¶
func (h *HandlerImpl) Update(ctx context.Context, params arguments.UserUpdate) (models.User, error)
Update ...
type ICoreHandler ¶
type ICoreHandler interface { GetByID(ctx context.Context, param arguments.UserGetByID) (models.User, error) GetByIDs(ctx context.Context, param arguments.UserGetByIDs) ([]models.User, error) Count(ctx context.Context, params arguments.UserCount) (int64, error) List(ctx context.Context, params arguments.UserList) ([]models.User, error) Insert(ctx context.Context, params arguments.UserInsert) (models.User, error) Update(ctx context.Context, params arguments.UserUpdate) (models.User, error) Delete(ctx context.Context, param arguments.UserDelete) (int64, error) }
ICoreHandler ...
type ICoreRepository ¶
type ICoreRepository interface { GetByID(ctx context.Context, param arguments.UserGetByID) (models.User, error) GetByIDs(ctx context.Context, param arguments.UserGetByIDs) ([]models.User, error) List(ctx context.Context, params arguments.UserList) ([]models.User, error) Count(ctx context.Context, params arguments.UserCount) (int64, error) Insert(ctx context.Context, params arguments.UserInsert) (models.User, error) Update(ctx context.Context, params arguments.UserUpdate) (models.User, error) Delete(ctx context.Context, param arguments.UserDelete) (int64, error) }
ICoreRepository ...
type IDatabase ¶
type IDatabase interface { Ping() error Close() error PrepareContext(ctx context.Context, query string) (database.IStmt, error) }
IDatabase ...
type IHandler ¶
type IHandler interface { ICoreHandler Login(ctx context.Context, param arguments.UserLogin) (string, error) }
IHandler ...
type IRepository ¶
type IRepository interface { ICoreRepository GetByUsername(ctx context.Context, username string) (models.User, error) }
IRepository ...
type RepositoryImpl ¶
type RepositoryImpl struct {
// contains filtered or unexported fields
}
RepositoryImpl ...
func (*RepositoryImpl) Delete ¶
func (r *RepositoryImpl) Delete(ctx context.Context, params arguments.UserDelete) (int64, error)
Delete ...
func (*RepositoryImpl) GetByID ¶
func (r *RepositoryImpl) GetByID(ctx context.Context, params arguments.UserGetByID) (models.User, error)
GetByID ...
func (*RepositoryImpl) GetByIDs ¶
func (r *RepositoryImpl) GetByIDs(ctx context.Context, params arguments.UserGetByIDs) ([]models.User, error)
GetByIDs ...
func (*RepositoryImpl) GetByUsername ¶
GetByUsername ...
func (*RepositoryImpl) Insert ¶
func (r *RepositoryImpl) Insert(ctx context.Context, params arguments.UserInsert) (models.User, error)
Insert ...
func (*RepositoryImpl) List ¶
func (r *RepositoryImpl) List(ctx context.Context, params arguments.UserList) ([]models.User, error)
List ...
func (*RepositoryImpl) Update ¶
func (r *RepositoryImpl) Update(ctx context.Context, params arguments.UserUpdate) (models.User, error)
Update ...
type ResolverImpl ¶
type ResolverImpl struct {
// contains filtered or unexported fields
}
ResolverImpl ...
func (*ResolverImpl) Count ¶
func (r *ResolverImpl) Count(params graphql.ResolveParams) (interface{}, error)
Count ...
func (*ResolverImpl) GetByID ¶
func (r *ResolverImpl) GetByID(param graphql.ResolveParams) (interface{}, error)
GetByID ...
func (*ResolverImpl) Insert ¶
func (r *ResolverImpl) Insert(params graphql.ResolveParams) (interface{}, error)
Insert ...
func (*ResolverImpl) List ¶
func (r *ResolverImpl) List(params graphql.ResolveParams) (interface{}, error)
List ...
func (*ResolverImpl) Login ¶
func (r *ResolverImpl) Login(param graphql.ResolveParams) (interface{}, error)
Login ...
func (*ResolverImpl) Update ¶
func (r *ResolverImpl) Update(params graphql.ResolveParams) (interface{}, error)
Update ...
Source Files ¶
Click to show internal directories.
Click to hide internal directories.