1
0
mirror of https://github.com/rancher/steve.git synced 2025-09-14 22:39:20 +00:00
Files
steve/pkg/resources/helm/register.go

21 lines
526 B
Go
Raw Normal View History

2020-06-05 13:30:33 -07:00
package helm
import (
"net/http"
"github.com/rancher/apiserver/pkg/types"
"github.com/rancher/steve/pkg/stores/partition"
2020-06-05 13:30:33 -07:00
)
func Register(schemas *types.APISchemas) {
schemas.InternalSchemas.TypeName("helmrelease", Release{})
schemas.MustImportAndCustomize(Release{}, func(schema *types.APISchema) {
schema.CollectionMethods = []string{http.MethodGet}
schema.ResourceMethods = []string{http.MethodGet}
schema.Store = &partition.Store{
Partitioner: &partitioner{},
}
schema.Formatter = FormatRelease
})
}