role

package
v0.0.0-...-cd8b1d2 Latest Latest
Warning

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

Go to latest
Published: Nov 26, 2019 License: MIT Imports: 13 Imported by: 0

Documentation

Overview

@generated

@generated

@generated

Index

Constants

This section is empty.

Variables

View Source
var (
	// Type ...
	Type = graphql.NewObject(graphql.ObjectConfig{
		Name:        "Role",
		Description: "This is type Feature",
		Fields: graphql.Fields{
			"id": &graphql.Field{
				Type:        graphql.NewNonNull(graphql.Int),
				Description: "This is role's id",
			},
			"name": &graphql.Field{
				Type:        graphql.NewNonNull(graphql.String),
				Description: "This is role's name",
			},
			"companyId": &graphql.Field{
				Type:        graphql.NewNonNull(graphql.Int),
				Description: "This is role's companyId",
			},
			"status": &graphql.Field{
				Type:        graphql.NewNonNull(graphql.String),
				Description: "This is role's status",
			},
			"createdBy": &graphql.Field{
				Type:        graphql.String,
				Description: "This is role's createdBy",
			},
			"updatedBy": &graphql.Field{
				Type:        graphql.String,
				Description: "This is role'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 role's id",
		},
		"name": &graphql.ArgumentConfig{
			Type:        graphql.String,
			Description: "This is role's name",
		},
		"companyId": &graphql.ArgumentConfig{
			Type:        graphql.Int,
			Description: "This is role's companyId",
		},
		"status": &graphql.ArgumentConfig{
			Type:        graphql.String,
			Description: "This is role's status",
		},
		"createdBy": &graphql.ArgumentConfig{
			Type:        graphql.String,
			Description: "This is role's createdBy",
		},
		"updatedBy": &graphql.ArgumentConfig{
			Type:        graphql.String,
			Description: "This is role'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{
		"name": &graphql.ArgumentConfig{
			Type:        graphql.NewNonNull(graphql.String),
			Description: "This is role's name",
		},
		"companyId": &graphql.ArgumentConfig{
			Type:        graphql.NewNonNull(graphql.Int),
			Description: "This is role's companyId",
		},
		"status": &graphql.ArgumentConfig{
			Type:        graphql.NewNonNull(graphql.String),
			Description: "This is role's status",
		},
		"createdBy": &graphql.ArgumentConfig{
			Type:        graphql.String,
			Description: "This is role's createdBy",
		},
		"updatedBy": &graphql.ArgumentConfig{
			Type:        graphql.String,
			Description: "This is role's updatedBy",
		},
	}
	// UpdateTypeArgs ...
	UpdateTypeArgs = graphql.FieldConfigArgument{
		"id": &graphql.ArgumentConfig{
			Type: graphql.NewNonNull(graphql.Int),
		},
		"name": &graphql.ArgumentConfig{
			Type:        graphql.String,
			Description: "This is role's name",
		},
		"companyId": &graphql.ArgumentConfig{
			Type:        graphql.Int,
			Description: "This is role's companyId",
		},
		"status": &graphql.ArgumentConfig{
			Type:        graphql.String,
			Description: "This is role's status",
		},
		"createdBy": &graphql.ArgumentConfig{
			Type:        graphql.String,
			Description: "This is role's createdBy",
		},
		"updatedBy": &graphql.ArgumentConfig{
			Type:        graphql.String,
			Description: "This is role's updatedBy",
		},
	}
)

Functions

This section is empty.

Types

type HandlerImpl

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

HandlerImpl ...

func NewHandler

func NewHandler(role IRepository) *HandlerImpl

NewHandler ...

func (*HandlerImpl) Count

func (h *HandlerImpl) Count(ctx context.Context, params arguments.RoleCount) (int64, error)

Count ...

func (*HandlerImpl) Delete

func (h *HandlerImpl) Delete(ctx context.Context, param arguments.RoleDelete) (int64, error)

Delete ...

func (*HandlerImpl) GetByID

func (h *HandlerImpl) GetByID(ctx context.Context, params arguments.RoleGetByID) (models.Role, error)

GetByID ...

func (*HandlerImpl) GetByIDs

func (h *HandlerImpl) GetByIDs(ctx context.Context, params arguments.RoleGetByIDs) ([]models.Role, error)

GetByIDs ...

func (*HandlerImpl) Insert

func (h *HandlerImpl) Insert(ctx context.Context, params arguments.RoleInsert) (models.Role, error)

Insert ...

func (*HandlerImpl) List

func (h *HandlerImpl) List(ctx context.Context, params arguments.RoleList) ([]models.Role, error)

List ...

func (*HandlerImpl) Update

func (h *HandlerImpl) Update(ctx context.Context, params arguments.RoleUpdate) (models.Role, error)

Update ...

type ICoreHandler

type ICoreHandler interface {
	GetByID(ctx context.Context, param arguments.RoleGetByID) (models.Role, error)
	GetByIDs(ctx context.Context, param arguments.RoleGetByIDs) ([]models.Role, error)
	Count(ctx context.Context, params arguments.RoleCount) (int64, error)
	List(ctx context.Context, params arguments.RoleList) ([]models.Role, error)
	Insert(ctx context.Context, params arguments.RoleInsert) (models.Role, error)
	Update(ctx context.Context, params arguments.RoleUpdate) (models.Role, error)
	Delete(ctx context.Context, param arguments.RoleDelete) (int64, error)
}

ICoreHandler ...

type ICoreRepository

type ICoreRepository interface {
	GetByID(ctx context.Context, param arguments.RoleGetByID) (models.Role, error)
	GetByIDs(ctx context.Context, param arguments.RoleGetByIDs) ([]models.Role, error)
	List(ctx context.Context, params arguments.RoleList) ([]models.Role, error)
	Count(ctx context.Context, params arguments.RoleCount) (int64, error)
	Insert(ctx context.Context, params arguments.RoleInsert) (models.Role, error)
	Update(ctx context.Context, params arguments.RoleUpdate) (models.Role, error)
	Delete(ctx context.Context, param arguments.RoleDelete) (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
}

IHandler ...

type IRepository

type IRepository interface {
	ICoreRepository
}

IRepository ...

type RepositoryImpl

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

RepositoryImpl ...

func NewRepository

func NewRepository(db database.IDB) *RepositoryImpl

NewRepository ...

func (*RepositoryImpl) Count

func (r *RepositoryImpl) Count(ctx context.Context, params arguments.RoleCount) (int64, error)

Count ...

func (*RepositoryImpl) Delete

func (r *RepositoryImpl) Delete(ctx context.Context, params arguments.RoleDelete) (int64, error)

Delete ...

func (*RepositoryImpl) GetByID

func (r *RepositoryImpl) GetByID(ctx context.Context, params arguments.RoleGetByID) (models.Role, error)

GetByID ...

func (*RepositoryImpl) GetByIDs

func (r *RepositoryImpl) GetByIDs(ctx context.Context, params arguments.RoleGetByIDs) ([]models.Role, error)

GetByIDs ...

func (*RepositoryImpl) Insert

func (r *RepositoryImpl) Insert(ctx context.Context, params arguments.RoleInsert) (models.Role, error)

Insert ...

func (*RepositoryImpl) List

func (r *RepositoryImpl) List(ctx context.Context, params arguments.RoleList) ([]models.Role, error)

List ...

func (*RepositoryImpl) Update

func (r *RepositoryImpl) Update(ctx context.Context, params arguments.RoleUpdate) (models.Role, error)

Update ...

type ResolverImpl

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

ResolverImpl ...

func NewResolver

func NewResolver(role IHandler) *ResolverImpl

NewResolver ...

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) Update

func (r *ResolverImpl) Update(params graphql.ResolveParams) (interface{}, error)

Update ...

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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