File: delegation_apply.go

package info (click to toggle)
golang-github-mimuret-golang-iij-dpf 0.9.1-2
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 1,340 kB
  • sloc: makefile: 55
file content (32 lines) | stat: -rw-r--r-- 704 bytes parent folder | download
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
package core

import (
	"net/http"

	"github.com/mimuret/golang-iij-dpf/pkg/api"
	"github.com/mimuret/golang-iij-dpf/pkg/apis"
)

var _ apis.Spec = &DelegationApply{}

// +k8s:deepcopy-gen:interfaces=github.com/mimuret/golang-iij-dpf/pkg/api.Object
type DelegationApply struct {
	AttributeMeta
	ZoneIDs []string `apply:"zone_ids"`
}

func (c *DelegationApply) GetName() string { return "delegations" }
func (c *DelegationApply) GetPathMethod(action api.Action) (string, string) {
	if action == api.ActionApply {
		return http.MethodPost, "/delegations"
	}
	return "", ""
}

func (c *DelegationApply) SetPathParams(args ...interface{}) error {
	return nil
}

func init() {
	register(&DelegationApply{})
}