Documentation ¶
Index ¶
- Variables
- type Controller
- type DefaultAPIController
- func (r *DefaultAPIController) Count(ctx context.Context, query *q.Query) (int64, error)
- func (r *DefaultAPIController) CreateImmutableRule(ctx context.Context, m *model.Metadata) (int64, error)
- func (r *DefaultAPIController) DeleteImmutableRule(ctx context.Context, id int64) error
- func (r *DefaultAPIController) DeleteImmutableRuleByProject(ctx context.Context, projectID int64) error
- func (r *DefaultAPIController) GetImmutableRule(ctx context.Context, id int64) (*model.Metadata, error)
- func (r *DefaultAPIController) ListImmutableRules(ctx context.Context, query *q.Query) ([]*model.Metadata, error)
- func (r *DefaultAPIController) UpdateImmutableRule(ctx context.Context, projectID int64, m *model.Metadata) error
Constants ¶
This section is empty.
Variables ¶
View Source
var ( // Ctr is a global variable for the default immutable controller implementation Ctr = NewAPIController(immutable.NewDefaultRuleManager()) )
Functions ¶
This section is empty.
Types ¶
type Controller ¶
type Controller interface { // GetImmutableRule ... GetImmutableRule(ctx context.Context, id int64) (*model.Metadata, error) // CreateImmutableRule ... CreateImmutableRule(ctx context.Context, m *model.Metadata) (int64, error) // DeleteImmutableRule ... DeleteImmutableRule(ctx context.Context, id int64) error // UpdateImmutableRule ... UpdateImmutableRule(ctx context.Context, projectID int64, m *model.Metadata) error // ListImmutableRules ... ListImmutableRules(ctx context.Context, query *q.Query) ([]*model.Metadata, error) // Count count the immutable rules Count(ctx context.Context, query *q.Query) (int64, error) // DeleteImmutableRuleByProject delete immuatable rules with project id DeleteImmutableRuleByProject(ctx context.Context, projectID int64) error }
Controller to handle the requests related with immutable
func NewAPIController ¶
func NewAPIController(immutableMgr immutable.Manager) Controller
NewAPIController ...
type DefaultAPIController ¶
type DefaultAPIController struct {
// contains filtered or unexported fields
}
DefaultAPIController ...
func (*DefaultAPIController) CreateImmutableRule ¶
func (r *DefaultAPIController) CreateImmutableRule(ctx context.Context, m *model.Metadata) (int64, error)
CreateImmutableRule ...
func (*DefaultAPIController) DeleteImmutableRule ¶
func (r *DefaultAPIController) DeleteImmutableRule(ctx context.Context, id int64) error
DeleteImmutableRule ...
func (*DefaultAPIController) DeleteImmutableRuleByProject ¶
func (r *DefaultAPIController) DeleteImmutableRuleByProject(ctx context.Context, projectID int64) error
func (*DefaultAPIController) GetImmutableRule ¶
func (r *DefaultAPIController) GetImmutableRule(ctx context.Context, id int64) (*model.Metadata, error)
GetImmutableRule ...
func (*DefaultAPIController) ListImmutableRules ¶
func (r *DefaultAPIController) ListImmutableRules(ctx context.Context, query *q.Query) ([]*model.Metadata, error)
ListImmutableRules ...
func (*DefaultAPIController) UpdateImmutableRule ¶
func (r *DefaultAPIController) UpdateImmutableRule(ctx context.Context, projectID int64, m *model.Metadata) error
UpdateImmutableRule ...
Click to show internal directories.
Click to hide internal directories.