Documentation
¶
Index ¶
- Constants
- func IsAuthError(err error) bool
- func IsErrorCode(err error, code string) (bool, string)
- func IsErrorCodeAttribute(err error, code string, attribute string) bool
- func IsInvalidSchema(err error) bool
- func IsNotFound(err error) (bool, string)
- func MarshalApply(body interface{}) ([]byte, error)
- func MarshalCreate(body interface{}) ([]byte, error)
- func MarshalMap(body interface{}) ([]byte, error)
- func MarshalOutput(spec Spec) ([]byte, error)
- func MarshalUpdate(body interface{}) ([]byte, error)
- func UnMarshalInput(bs []byte, spec Spec) error
- func UnmarshalRead(bs []byte, o interface{}) error
- type Action
- type AsyncResponse
- type BadResponse
- type Client
- func (c *Client) Apply(s Spec, body interface{}) (requestId string, err error)
- func (c *Client) Cancel(s Spec) (requestId string, err error)
- func (c *Client) Count(s CountableListSpec, keywords SearchParams) (requestId string, err error)
- func (c *Client) Create(s Spec, body interface{}) (requestId string, err error)
- func (c *Client) Delete(s Spec) (requestId string, err error)
- func (c *Client) Do(spec Spec, action Action, body interface{}, params SearchParams) (requestId string, err error)
- func (c *Client) List(s ListSpec, keywords SearchParams) (requestId string, err error)
- func (c *Client) ListALL(s CountableListSpec, keywords SearchParams) (requestId string, err error)
- func (c *Client) Read(s Spec) (requestId string, err error)
- func (c *Client) SetLogger(l Logger) *Client
- func (c *Client) SetWatchInterval(d time.Duration) error
- func (c *Client) SetWatchTimeout(d time.Duration) error
- func (c *Client) Update(s Spec, body interface{}) (requestId string, err error)
- func (c *Client) Watch(ctx context.Context, f func() (keep bool, err error)) error
- func (c *Client) WatchList(ctx context.Context, s ListSpec, keyword SearchParams) error
- func (c *Client) WatchListAll(ctx context.Context, s CountableListSpec, keyword SearchParams) error
- func (c *Client) WatchRead(ctx context.Context, s Spec) error
- type CommonSearchParams
- func (k *CommonSearchParams) GetLimit() int32
- func (k *CommonSearchParams) GetOffset() int32
- func (k *CommonSearchParams) GetType() SearchType
- func (s *CommonSearchParams) GetValues() (url.Values, error)
- func (k *CommonSearchParams) SetLimit(limit int32)
- func (k *CommonSearchParams) SetOffset(offset int32)
- func (k *CommonSearchParams) SetType(t SearchType)
- type Count
- type CountResponse
- type CountableListSpec
- type ErrorDetail
- type ErrorDetails
- type Initializer
- type KeywordsBoolean
- type KeywordsFavorite
- type KeywordsId
- type KeywordsState
- type KeywordsString
- type ListSpec
- type Logger
- type Object
- type OutputFrame
- type RawResponse
- type RequestInfo
- type ResponseCommon
- type ResponseInfo
- type RowSearchParams
- type SearchDate
- type SearchLimit
- type SearchOffset
- type SearchOrder
- type SearchParams
- type SearchTimeZone
- type SearchType
- type Spec
- type StdLogger
Constants ¶
View Source
const DefaultEndpoint = "https://api.dns-platform.jp/dpf/v1"
Variables ¶
This section is empty.
Functions ¶
func IsAuthError ¶
func IsErrorCodeAttribute ¶
func IsInvalidSchema ¶
func IsNotFound ¶
func MarshalApply ¶
func MarshalCreate ¶
func MarshalMap ¶
func MarshalOutput ¶
func MarshalUpdate ¶
func UnMarshalInput ¶
func UnmarshalRead ¶
Types ¶
type Action ¶
type Action string
var ( ActionCreate Action = "Create" ActionRead Action = "Read" ActionList Action = "List" ActionUpdate Action = "Update" ActionDelete Action = "Delete" ActionCount Action = "Count" ActionCancel Action = "Cancel" ActionApply Action = "Apply" Actions = []Action{ ActionCreate, ActionRead, ActionList, ActionUpdate, ActionDelete, ActionCount, ActionCancel, ActionApply, } )
type AsyncResponse ¶
type AsyncResponse struct { ResponseCommon `read:",inline"` JobsUrl string `read:"jobs_url"` }
type BadResponse ¶
type BadResponse struct { ResponseCommon `read:",inline"` ErrorType string `read:"error_type"` ErrorMessage string `read:"error_message"` ErrorDetails ErrorDetails `read:"error_details"` }
func (*BadResponse) Error ¶
func (r *BadResponse) Error() string
type Client ¶
type Client struct { Endpoint string Token string LastRequest *RequestInfo LastResponse *ResponseInfo // contains filtered or unexported fields }
func (*Client) Count ¶
func (c *Client) Count(s CountableListSpec, keywords SearchParams) (requestId string, err error)
func (*Client) List ¶
func (c *Client) List(s ListSpec, keywords SearchParams) (requestId string, err error)
func (*Client) ListALL ¶
func (c *Client) ListALL(s CountableListSpec, keywords SearchParams) (requestId string, err error)
func (*Client) WatchListAll ¶
func (c *Client) WatchListAll(ctx context.Context, s CountableListSpec, keyword SearchParams) error
type CommonSearchParams ¶
type CommonSearchParams struct { Type SearchType `url:"type,omitempty"` Offset int32 `url:"offset,omitempty"` Limit int32 `url:"limit,omitempty"` }
func (*CommonSearchParams) GetLimit ¶
func (k *CommonSearchParams) GetLimit() int32
func (*CommonSearchParams) GetOffset ¶
func (k *CommonSearchParams) GetOffset() int32
func (*CommonSearchParams) GetType ¶
func (k *CommonSearchParams) GetType() SearchType
func (*CommonSearchParams) SetLimit ¶
func (k *CommonSearchParams) SetLimit(limit int32)
func (*CommonSearchParams) SetOffset ¶
func (k *CommonSearchParams) SetOffset(offset int32)
func (*CommonSearchParams) SetType ¶
func (k *CommonSearchParams) SetType(t SearchType)
type CountResponse ¶
type CountResponse struct { ResponseCommon `read:",inline"` Result Count `read:"result"` }
type CountableListSpec ¶
type ErrorDetail ¶
func (ErrorDetail) Error ¶
func (e ErrorDetail) Error() string
type ErrorDetails ¶
type ErrorDetails []ErrorDetail
func (ErrorDetails) Error ¶
func (e ErrorDetails) Error() string
type Initializer ¶
type Initializer interface {
Init()
}
type KeywordsBoolean ¶
+k8s:deepcopy-gen=false
func (KeywordsBoolean) EncodeValues ¶
func (c KeywordsBoolean) EncodeValues(key string, v *url.Values) error
type KeywordsFavorite ¶
+k8s:deepcopy-gen=false
func (KeywordsFavorite) EncodeValues ¶
func (c KeywordsFavorite) EncodeValues(key string, v *url.Values) error
type KeywordsId ¶
type KeywordsId []int64
+k8s:deepcopy-gen=false
func (KeywordsId) Validate ¶
func (s KeywordsId) Validate() bool
type KeywordsState ¶
+k8s:deepcopy-gen=false
func (KeywordsState) EncodeValues ¶
func (c KeywordsState) EncodeValues(key string, v *url.Values) error
type KeywordsString ¶
type KeywordsString []string
+k8s:deepcopy-gen=false
func (KeywordsString) Validate ¶
func (s KeywordsString) Validate() bool
type ListSpec ¶
type ListSpec interface { Spec Initializer GetItems() interface{} Len() int Index(int) interface{} }
type OutputFrame ¶
type OutputFrame struct { meta.KindVersion `json:",inline"` Spec Spec `json:"spec"` }
type RawResponse ¶
type RawResponse struct { ResponseCommon `read:",inline"` Result json.RawMessage `read:"result"` Results json.RawMessage `read:"results"` }
type RequestInfo ¶
type ResponseCommon ¶
type ResponseCommon struct {
RequestId string `read:"request_id"`
}
type ResponseInfo ¶
type RowSearchParams ¶
func NewRowSearchParams ¶
func NewRowSearchParams(queryString string) (*RowSearchParams, error)
func (RowSearchParams) GetLimit ¶
func (r RowSearchParams) GetLimit() int32
func (RowSearchParams) GetOffset ¶
func (r RowSearchParams) GetOffset() int32
func (RowSearchParams) SetLimit ¶
func (r RowSearchParams) SetLimit(limit int32)
func (RowSearchParams) SetOffset ¶
func (r RowSearchParams) SetOffset(offset int32)
type SearchLimit ¶
type SearchLimit int32
+k8s:deepcopy-gen=false
func (SearchLimit) Validate ¶
func (s SearchLimit) Validate() bool
type SearchOffset ¶
type SearchOffset int32
+k8s:deepcopy-gen=false
func (SearchOffset) Validate ¶
func (s SearchOffset) Validate() bool
type SearchOrder ¶
type SearchOrder string
+k8s:deepcopy-gen=false
var ( SearchOrderASC SearchOrder = "ASC" SearchOrderDESC SearchOrder = "DESC" )
func (SearchOrder) Validate ¶
func (s SearchOrder) Validate() bool
type SearchParams ¶
type SearchTimeZone ¶
type SearchTimeZone string
+k8s:deepcopy-gen=false
func (SearchTimeZone) Sec ¶
func (s SearchTimeZone) Sec() int
func (SearchTimeZone) Validate ¶
func (s SearchTimeZone) Validate() bool
type SearchType ¶
type SearchType string
+k8s:deepcopy-gen=false
var ( SearchTypeAND SearchType = "AND" SearchTypeOR SearchType = "OR" )
func (SearchType) Validate ¶
func (s SearchType) Validate() bool
Click to show internal directories.
Click to hide internal directories.