Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Menus ¶
type Menus []*Menu
func (Menus) FillMenuAction ¶
func (a Menus) FillMenuAction(mActions map[string]menuaction.MenuActions) Menus
func (Menus) SplitParentIDs ¶
type QueryParam ¶
type QueryParam struct { PaginationParam pagination.Param OrderFields pagination.OrderFields IDs []string Name string PrefixParentPath string QueryValue string ParentID *string ShowStatus int Status int }
type Repository ¶
type Repository interface { Query(ctx context.Context, params QueryParam) (Menus, *pagination.Pagination, error) Get(ctx context.Context, id string) (*Menu, error) Create(ctx context.Context, item *Menu) error Update(ctx context.Context, id string, item *Menu) error UpdateParentPath(ctx context.Context, id, parentPath string) error Delete(ctx context.Context, id string) error UpdateStatus(ctx context.Context, id string, status int) error }
type Service ¶
type Service interface { Query(ctx context.Context, params QueryParam) (Menus, *pagination.Pagination, error) Get(ctx context.Context, id string) (*Menu, error) QueryActions(ctx context.Context, id string) (menuaction.MenuActions, error) Create(ctx context.Context, item *Menu) (string, error) Update(ctx context.Context, id string, item *Menu) error Delete(ctx context.Context, id string) error UpdateStatus(ctx context.Context, id string, status int) error }
func NewService ¶
func NewService( transRepo trans.Repository, menuRepo Repository, menuActionRepo menuaction.Repository, menuActionResourceRepo menuactionresource.Repository, ) Service
Click to show internal directories.
Click to hide internal directories.