Documentation ¶
Index ¶
- func NewBan() Ban
- func NewEmoji() discord.Emoji
- func NewGuild() Guild
- func NewIcon() GuildIcon
- func NewMember() discord.GuildMember
- func NewRole() Role
- func NewWidget() Widget
- type EmojiSlice
- func (e EmojiSlice) IsNil() bool
- func (e EmojiSlice) IsValid() bool
- func (e EmojiSlice) JSONSize() (size int)
- func (e EmojiSlice) MarshalJSON() ([]byte, error)
- func (e EmojiSlice) MarshalJSONArray(enc *gojay.Encoder)
- func (e *EmojiSlice) UnmarshalJSON(in []byte) error
- func (e *EmojiSlice) UnmarshalJSONArray(dec *gojay.Decoder) error
- func (e EmojiSlice) Validate() error
- type FeatureSlice
- func (f FeatureSlice) IsNil() bool
- func (f FeatureSlice) IsValid() bool
- func (f FeatureSlice) JSONSize() (size int)
- func (f FeatureSlice) MarshalJSON() ([]byte, error)
- func (f FeatureSlice) MarshalJSONArray(enc *gojay.Encoder)
- func (f *FeatureSlice) UnmarshalJSON(in []byte) error
- func (f *FeatureSlice) UnmarshalJSONArray(dec *gojay.Decoder) error
- func (f FeatureSlice) Validate() error
- type IconImpl
- func (i *IconImpl) AspectRatio() lib.AspectRatio
- func (i *IconImpl) Close() error
- func (i *IconImpl) Format() ImageFormat
- func (i *IconImpl) Height() uint16
- func (i *IconImpl) IsValid() bool
- func (i *IconImpl) MarshalJSON() ([]byte, error)
- func (i *IconImpl) String() (string, error)
- func (i *IconImpl) UnmarshalJSON(in []byte) (err error)
- func (i *IconImpl) Validate() error
- func (i *IconImpl) Width() uint16
- type RoleSlice
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewMember ¶
func NewMember() discord.GuildMember
Types ¶
type EmojiSlice ¶
func (EmojiSlice) IsNil ¶
func (e EmojiSlice) IsNil() bool
func (EmojiSlice) IsValid ¶
func (e EmojiSlice) IsValid() bool
func (EmojiSlice) JSONSize ¶
func (e EmojiSlice) JSONSize() (size int)
func (EmojiSlice) MarshalJSON ¶
func (e EmojiSlice) MarshalJSON() ([]byte, error)
func (EmojiSlice) MarshalJSONArray ¶
func (e EmojiSlice) MarshalJSONArray(enc *gojay.Encoder)
func (*EmojiSlice) UnmarshalJSON ¶
func (e *EmojiSlice) UnmarshalJSON(in []byte) error
func (*EmojiSlice) UnmarshalJSONArray ¶
func (e *EmojiSlice) UnmarshalJSONArray(dec *gojay.Decoder) error
func (EmojiSlice) Validate ¶
func (e EmojiSlice) Validate() error
type FeatureSlice ¶
type FeatureSlice []discord.GuildFeature
func (FeatureSlice) IsNil ¶
func (f FeatureSlice) IsNil() bool
func (FeatureSlice) IsValid ¶
func (f FeatureSlice) IsValid() bool
func (FeatureSlice) JSONSize ¶
func (f FeatureSlice) JSONSize() (size int)
func (FeatureSlice) MarshalJSON ¶
func (f FeatureSlice) MarshalJSON() ([]byte, error)
func (FeatureSlice) MarshalJSONArray ¶
func (f FeatureSlice) MarshalJSONArray(enc *gojay.Encoder)
func (*FeatureSlice) UnmarshalJSON ¶
func (f *FeatureSlice) UnmarshalJSON(in []byte) error
func (*FeatureSlice) UnmarshalJSONArray ¶
func (f *FeatureSlice) UnmarshalJSONArray(dec *gojay.Decoder) error
func (FeatureSlice) Validate ¶
func (f FeatureSlice) Validate() error
type IconImpl ¶
type IconImpl struct {
Root ImageData
}
func (*IconImpl) AspectRatio ¶
func (i *IconImpl) AspectRatio() lib.AspectRatio
func (*IconImpl) Close ¶
Close will attempt to close the input io.ReadSeeker instance if it also happens to be an instance of io.Closer.
If the input io.ReadSeeker is not also an instance of io.Closer, then this method will do nothing.
func (*IconImpl) MarshalJSON ¶
func (*IconImpl) UnmarshalJSON ¶
UnmarshalJSON attempts to deserialize a string encoded image data value into the current Icon instance.
This method may return one of the following library errors:
image.ErrBadImageDataSize = The base64 encoded image data is too small to be a valid image, it may have been truncated by the source. See image.MinPossibleImageString.
image.ErrBadImageDataJsonType = The value passed to this method was not a string.
image.ErrBadImageDataFormat = The given image data string is corrupt or malformed and contains no divider between the prefix and the actual image data.
image.ErrBadImageFormat = The input image data string is not of a type recognized by this library. See image.ImageFormat for the list of allowed types.
image.ErrTypeMismatch = The image format declared in the image data string's prefix does not match the actual type of the base64 encoded image.
In addition to the above errors, this method may return errors from the standard library's `image` or `base64` packages, or any error returned from attempting to close the previous image data held by this GuildIcon instance.