gen

package
v0.0.0-...-a8ddf66 Latest Latest
Warning

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

Go to latest
Published: Aug 19, 2020 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Gen

func Gen(f *os.File, data map[string]interface{}) error

func ID

func ID() (string, error)

Types

type Action

type Action struct {
	ID          string
	Name        string
	Description string
	CreatedAt   time.Time
	UpdateAt    time.Time
}

func NewAction

func NewAction(name string) Action

func (Action) String

func (a Action) String() string

type Permission

type Permission struct {
	ID         string
	ActionID   string
	ResourceID string
	CreatedAt  time.Time
	UpdateAt   time.Time
	Key        string
}

func NewPermission

func NewPermission(action Action, resource Resource) Permission

func (Permission) String

func (a Permission) String() string

type Resource

type Resource struct {
	ID        string
	Name      string
	CreatedAt time.Time
	UpdateAt  time.Time
}

func NewResource

func NewResource(name string) Resource

func (Resource) String

func (a Resource) String() string

type Role

type Role struct {
	ID        string
	Name      string
	CreatedAt time.Time
	UpdateAt  time.Time
}

func NewRole

func NewRole(name string) Role

func (Role) String

func (a Role) String() string

type RolePermission

type RolePermission struct {
	RoleID       string
	PermissionID string
}

func NewRolePermission

func NewRolePermission(roleID, permissionID string) RolePermission

func (RolePermission) String

func (a RolePermission) String() string

Jump to

Keyboard shortcuts

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