objects

package
v0.0.84 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Dec 17, 2024 License: GPL-3.0 Imports: 16 Imported by: 7

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func SendRequest

func SendRequest(client *http.Client, URL string, method string, data []byte) *contracts.Response

Types

type Object

type Object struct {
	Byte       []byte
	String     string
	Definition map[string]interface{}

	Changelog diff.Changelog
	Raw       bool

	Owner   string
	Created time.Time
	Updated time.Time
	User    *authentication.User
	// contains filtered or unexported fields
}

func New

func New(client *client.Client, user *authentication.User) *Object

func (*Object) Add

func (obj *Object) Add(format *f.Format, data string) error

func (*Object) ChangeDetected

func (obj *Object) ChangeDetected() bool

func (*Object) Diff

func (obj *Object) Diff(definition string) bool

func (*Object) Exists

func (obj *Object) Exists() bool

func (*Object) Find

func (obj *Object) Find(format *f.Format) error

func (*Object) FindMany added in v0.0.2

func (obj *Object) FindMany(format *f.Format) (map[string]*Object, error)

func (*Object) GetDefinition

func (obj *Object) GetDefinition() map[string]any

func (*Object) GetDefinitionByte

func (obj *Object) GetDefinitionByte() []byte

func (*Object) GetDefinitionString

func (obj *Object) GetDefinitionString() string

func (*Object) Remove

func (obj *Object) Remove(format *f.Format) (bool, error)

func (*Object) Update

func (obj *Object) Update(format *f.Format, data string) error

type ObjectInterface added in v0.0.2

type ObjectInterface interface {
	GetDefinitionString() string
	GetDefinition() map[string]any
	GetDefinitionByte() []byte
	Add(format *f.Format, data string) error
	Update(format *f.Format, data string) error
	Find(format *f.Format) error
	Remove(format *f.Format) (bool, error)
	Diff(definition string) bool
	Exists() bool
	ChangeDetected() bool
}

Directories

Path Synopsis
Package mock_objects is a generated GoMock package.
Package mock_objects is a generated GoMock package.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL