Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( ErrACINotFound = errors.New("aci not found") ErrPermissionDenied = errors.New("permission denied") )
Functions ¶
This section is empty.
Types ¶
type ACIRepository ¶
type ACIRepository interface {
Create(ctx context.Context, aci *ACI) error
GetById(ctx context.Context, id string) (*ACI, error)
GetByResource(ctx context.Context, resource string) ([]*ACI, error)
GetByRoleId(ctx context.Context, roleId string) ([]*ACI, error)
GetByPayload(ctx context.Context, payload string) ([]*ACI, error)
GetByUserId(ctx context.Context, userId string) ([]*ACI, error)
CheckByRoleId(ctx context.Context, roleId string, resource string, payload string) (bool, error)
CheckByUserId(ctx context.Context, userId string, resource string, payload string) (bool, error)
}
type ACIUseCase ¶
type ACIUseCase interface {
Create(ctx context.Context, aci *ACI) error
GetById(ctx context.Context, id string) (*ACI, error)
GetByResource(ctx context.Context, resource string) ([]*ACI, error)
GetByRoleId(ctx context.Context, roleId string) ([]*ACI, error)
GetByPayload(ctx context.Context, payload string) ([]*ACI, error)
GetByUserId(ctx context.Context, userId string) ([]*ACI, error)
}
type AuthRepository ¶
type AuthRepository interface {
Create(ctx context.Context, auth *Auth) error
GetById(ctx context.Context, id string) (*Auth, error)
GetByUsername(ctx context.Context, username string) (*Auth, error)
GetByUsernameAndHpassword(ctx context.Context, username, hpassword string) (*Auth, error)
Update(ctx context.Context, auth *Auth) error
Delete(ctx context.Context, id string) error
}
type AuthUseCase ¶
type JwtGenerator ¶
Click to show internal directories.
Click to hide internal directories.