2023-03-14 13:18:55 +00:00
|
|
|
/**
|
|
|
|
* Copyright (c) HashiCorp, Inc.
|
2023-08-11 13:12:13 +00:00
|
|
|
* SPDX-License-Identifier: BUSL-1.1
|
2023-03-14 13:18:55 +00:00
|
|
|
*/
|
|
|
|
|
2021-03-26 15:47:47 +00:00
|
|
|
import RepositoryService from 'consul-ui/services/repository';
|
|
|
|
import { PRIMARY_KEY, SLUG_KEY } from 'consul-ui/models/binding-rule';
|
|
|
|
import dataSource from 'consul-ui/decorators/data-source';
|
|
|
|
|
|
|
|
const MODEL_NAME = 'binding-rule';
|
|
|
|
|
|
|
|
export default class BindingRuleService extends RepositoryService {
|
|
|
|
getModelName() {
|
|
|
|
return MODEL_NAME;
|
|
|
|
}
|
|
|
|
|
|
|
|
getPrimaryKey() {
|
|
|
|
return PRIMARY_KEY;
|
|
|
|
}
|
|
|
|
|
|
|
|
getSlugKey() {
|
|
|
|
return SLUG_KEY;
|
|
|
|
}
|
|
|
|
|
2021-09-15 18:50:11 +00:00
|
|
|
@dataSource('/:partition/:ns/:dc/binding-rules/for-auth-method/:authmethod')
|
|
|
|
async findAllByAuthMethod() {
|
|
|
|
return super.findAll(...arguments);
|
2021-03-26 15:47:47 +00:00
|
|
|
}
|
|
|
|
}
|