resources

package
v2.0.0 Latest Latest
Warning

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

Go to latest
Published: Jul 14, 2022 License: Apache-2.0 Imports: 2 Imported by: 4

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type IHasName

type IHasName interface {
	GetName() string
	SetName(string)
}

type IHasSpace

type IHasSpace interface {
	GetSpaceID() string
	SetSpaceID(string)
}

type IResource

type IResource interface {
	GetID() string
	GetModifiedBy() string
	GetModifiedOn() *time.Time
	GetLinks() map[string]string
	SetID(string)
	SetLinks(map[string]string)
	SetModifiedBy(string)
	SetModifiedOn(*time.Time)
	Validate() error
}

IResource defines the interface for resources.

type Links struct {
	Self        string `json:"Self"`
	Template    string `json:"Template"`
	PageAll     string `json:"Page.All"`
	PageCurrent string `json:"Page.Current"`
	PageLast    string `json:"Page.Last"`
	PageNext    string `json:"Page.Next"`
}

type PagedResults

type PagedResults struct {
	ItemsPerPage   int    `json:"ItemsPerPage"`
	ItemType       string `json:"ItemType"`
	LastPageNumber int    `json:"LastPageNumber"`
	Links          Links  `json:"Links"`
	NumberOfPages  int    `json:"NumberOfPages"`
	TotalResults   int    `json:"TotalResults"`
}

type ProcessReferenceDataItem

type ProcessReferenceDataItem struct {
	ID          string `json:"Id,omitempty"`
	Name        string `json:"Name,omitempty"`
	ProcessType string `json:"ProcessType,omitempty"`
}

type ReferenceDataItem

type ReferenceDataItem struct {
	ID   string `json:"Id,omitempty"`
	Name string `json:"Name,omitempty"`
}

type Resource

type Resource struct {
	ID         string            `json:"Id,omitempty"`
	ModifiedBy string            `json:"LastModifiedBy,omitempty"`
	ModifiedOn *time.Time        `json:"LastModifiedOn,omitempty"`
	Links      map[string]string `json:"Links,omitempty"`
}

func NewResource

func NewResource() *Resource

func (*Resource) GetID

func (r *Resource) GetID() string

GetID returns the ID value of the resource.

func (r *Resource) GetLinks() map[string]string

GetLinks returns the associated links with the value of this resource.

func (*Resource) GetModifiedBy

func (r *Resource) GetModifiedBy() string

GetModifiedBy returns the name of the account that modified the value of this resource.

func (*Resource) GetModifiedOn

func (r *Resource) GetModifiedOn() *time.Time

GetModifiedOn returns the time when the value of this resource was changed.

func (*Resource) SetID

func (r *Resource) SetID(id string)

SetID sets the ID value of the resource.

func (r *Resource) SetLinks(links map[string]string)

SetLinks sets the associated links with the value of this resource.

func (*Resource) SetModifiedBy

func (r *Resource) SetModifiedBy(modifiedBy string)

SetModifiedBy set the name of the account that modified the value of this resource.

func (*Resource) SetModifiedOn

func (r *Resource) SetModifiedOn(modifiedOn *time.Time)

SetModifiedOn set the time when the value of this resource was changed.

func (*Resource) Validate

func (r *Resource) Validate() error

Validate checks the state of the resource and returns an error if invalid.

type Resources

type Resources struct {
	Items []*Resource `json:"Items"`
	PagedResults
}

Jump to

Keyboard shortcuts

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