Skip to content

Placement🔗

Definition🔗

type Placement struct {
    Top *float64 `json:"top,omitempty"`
    Left *float64 `json:"left,omitempty"`
    Right *float64 `json:"right,omitempty"`
    Bottom *float64 `json:"bottom,omitempty"`
    Width *float64 `json:"width,omitempty"`
    Height *float64 `json:"height,omitempty"`
    Rotation *float64 `json:"rotation,omitempty"`
}

Methods🔗

UnmarshalJSONStrict🔗

UnmarshalJSONStrict implements a custom JSON unmarshalling logic to decode Placement from JSON.

Note: the unmarshalling done by this function is strict. It will fail over required fields being absent from the input, fields having an incorrect type, unexpected fields being present, …

func (placement *Placement) UnmarshalJSONStrict(raw []byte) error

Equals🔗

Equals tests the equality of two Placement objects.

func (placement *Placement) Equals(other Placement) bool

Validate🔗

Validate checks all the validation constraints that may be defined on Placement fields for violations and returns them.

func (placement *Placement) Validate() error

See also🔗