forked from hashicorp/terraform-provider-azurerm
-
Notifications
You must be signed in to change notification settings - Fork 0
/
service_registration.go
39 lines (30 loc) · 1.35 KB
/
service_registration.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
package sdk
import (
"github.com/kevinklinger/terraform-provider-azurerm/v2/internal/tf/pluginsdk"
)
// TypedServiceRegistration is a Service Registration using Types
// meaning that we can abstract on top of the Plugin SDK and use
// Native Types where possible
type TypedServiceRegistration interface {
// Name is the name of this Service
Name() string
// DataSources returns a list of Data Sources supported by this Service
DataSources() []DataSource
// Resources returns a list of Resources supported by this Service
Resources() []Resource
// WebsiteCategories returns a list of categories which can be used for the sidebar
WebsiteCategories() []string
}
// UntypedServiceRegistration is the interface used for untyped/raw Plugin SDK resources
// in the future this'll be superseded by the TypedServiceRegistration which allows for
// stronger Typed resources to be used.
type UntypedServiceRegistration interface {
// Name is the name of this Service
Name() string
// WebsiteCategories returns a list of categories which can be used for the sidebar
WebsiteCategories() []string
// SupportedDataSources returns the supported Data Sources supported by this Service
SupportedDataSources() map[string]*pluginsdk.Resource
// SupportedResources returns the supported Resources supported by this Service
SupportedResources() map[string]*pluginsdk.Resource
}