sievescript

package
v0.26.0 Latest Latest
Warning

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

Go to latest
Published: Feb 18, 2026 License: MIT Imports: 2 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Changes

type Changes struct {
	Account    jmap.ID `json:"accountId,omitempty"`
	SinceState string  `json:"sinceState,omitempty"`
	MaxChanges uint64  `json:"maxChanges,omitempty"`
}

func (*Changes) Name

func (m *Changes) Name() string

func (*Changes) Requires

func (m *Changes) Requires() []jmap.URI

type ChangesResponse

type ChangesResponse struct {
	Account        jmap.ID   `json:"accountId,omitempty"`
	OldState       string    `json:"oldState,omitempty"`
	NewState       string    `json:"newState,omitempty"`
	HasMoreChanges bool      `json:"hasMoreChanges,omitempty"`
	Created        []jmap.ID `json:"created,omitempty"`
	Updated        []jmap.ID `json:"updated,omitempty"`
	Destroyed      []jmap.ID `json:"destroyed,omitempty"`
}

type Filter

type Filter interface {
	// contains filtered or unexported methods
}

type FilterCondition

type FilterCondition struct {
	Name     string `json:"name,omitempty"`
	IsActive bool   `json:"isActive,omitempty"`
}

type FilterOperator

type FilterOperator struct {
	Operator   jmap.Operator `json:"operator,omitempty"`
	Conditions []Filter      `json:"conditions,omitempty"`
}

type Get

type Get struct {
	Account             jmap.ID               `json:"accountId,omitempty"`
	IDs                 []jmap.ID             `json:"ids,omitempty"`
	Properties          []string              `json:"properties,omitempty"`
	ReferenceIDs        *jmap.ResultReference `json:"#ids,omitempty"`
	ReferenceProperties *jmap.ResultReference `json:"#properties,omitempty"`
}

func (*Get) Name

func (m *Get) Name() string

func (*Get) Requires

func (m *Get) Requires() []jmap.URI

type GetResponse

type GetResponse struct {
	Account  jmap.ID        `json:"accountId,omitempty"`
	State    string         `json:"state,omitempty"`
	List     []*SieveScript `json:"list,omitempty"`
	NotFound []string       `json:"notFound,omitempty"`
}

type Query

type Query struct {
	Account        jmap.ID           `json:"accountId,omitempty"`
	Filter         Filter            `json:"filter,omitempty"`
	Sort           []*SortComparator `json:"sort,omitempty"`
	Position       int64             `json:"position,omitempty"`
	Anchor         jmap.ID           `json:"anchor,omitempty"`
	AnchorOffset   int64             `json:"anchorOffset,omitempty"`
	Limit          uint64            `json:"limit,omitempty"`
	CalculateTotal bool              `json:"calculateTotal,omitempty"`
}

func (*Query) Name

func (m *Query) Name() string

func (*Query) Requires

func (m *Query) Requires() []jmap.URI

type QueryChanges

type QueryChanges struct {
	Account         jmap.ID           `json:"accountId,omitempty"`
	Filter          Filter            `json:"filter,omitempty"`
	Sort            []*SortComparator `json:"sort,omitempty"`
	SinceQueryState string            `json:"sinceQueryState,omitempty"`
	MaxChanges      uint64            `json:"maxChanges,omitempty"`
	UpToID          jmap.ID           `json:"upToId,omitempty"`
	CalculateTotal  bool              `json:"calculateTotal,omitempty"`
}

func (*QueryChanges) Name

func (m *QueryChanges) Name() string

func (*QueryChanges) Requires

func (m *QueryChanges) Requires() []jmap.URI

type QueryChangesResponse

type QueryChangesResponse struct {
	Account       jmap.ID           `json:"accountId,omitempty"`
	OldQueryState string            `json:"oldQueryState,omitempty"`
	NewQueryState string            `json:"newQueryState,omitempty"`
	Removed       []jmap.ID         `json:"removed,omitempty"`
	Added         []*jmap.AddedItem `json:"added,omitempty"`
}

type QueryResponse

type QueryResponse struct {
	Account             jmap.ID   `json:"accountId,omitempty"`
	QueryState          string    `json:"queryState,omitempty"`
	CanCalculateChanges bool      `json:"canCalculateChanges,omitempty"`
	Position            uint64    `json:"position,omitempty"`
	IDs                 []jmap.ID `json:"ids,omitempty"`
	Total               int64     `json:"total,omitempty"`
	Limit               uint64    `json:"limit,omitempty"`
}

type Set

type Set struct {
	Account   jmap.ID                  `json:"accountId,omitempty"`
	IfInState string                   `json:"ifInState,omitempty"`
	Create    map[jmap.ID]*SieveScript `json:"create,omitempty"`
	Update    map[jmap.ID]jmap.Patch   `json:"update,omitempty"`
	Destroy   []jmap.ID                `json:"destroy,omitempty"`

	// OnSuccessActivateScript is the ID of the script to activate if the
	// set operation succeeds, or "#creation-id" to reference a script being
	// created in the same call
	OnSuccessActivateScript *jmap.ID `json:"onSuccessActivateScript,omitempty"`

	// OnSuccessDeactivateScript indicates whether to deactivate the active
	// script if the set operation succeeds
	OnSuccessDeactivateScript bool `json:"onSuccessDeactivateScript,omitempty"`
}

func (*Set) Name

func (m *Set) Name() string

func (*Set) Requires

func (m *Set) Requires() []jmap.URI

type SetResponse

type SetResponse struct {
	Account      jmap.ID                    `json:"accountId,omitempty"`
	OldState     string                     `json:"oldState,omitempty"`
	NewState     string                     `json:"newState,omitempty"`
	Created      map[jmap.ID]*SieveScript   `json:"created,omitempty"`
	Updated      map[jmap.ID]*SieveScript   `json:"updated,omitempty"`
	Destroyed    []jmap.ID                  `json:"destroyed,omitempty"`
	NotCreated   map[jmap.ID]*jmap.SetError `json:"notCreated,omitempty"`
	NotUpdated   map[jmap.ID]*jmap.SetError `json:"notUpdated,omitempty"`
	NotDestroyed map[jmap.ID]*jmap.SetError `json:"notDestroyed,omitempty"`
}

type SieveScript

type SieveScript struct {
	// ID is the server-assigned identifier for this script
	ID jmap.ID `json:"id,omitempty"`

	// Name is the user-assigned name of the script
	Name *string `json:"name,omitempty"`

	// BlobID is the identifier for the blob containing the raw script
	BlobID jmap.ID `json:"blobId,omitempty"`

	// IsActive indicates whether this script is the active script
	IsActive bool `json:"isActive,omitempty"`
}

SieveScript represents a Sieve script on the server

type SortComparator

type SortComparator struct {
	Property    string             `json:"property,omitempty"`
	IsAscending bool               `json:"isAscending"`
	Collation   jmap.CollationAlgo `json:"collation,omitempty"`
}

type Validate

type Validate struct {
	Account jmap.ID `json:"accountId,omitempty"`
	BlobID  jmap.ID `json:"blobId,omitempty"`
}

func (*Validate) Name

func (m *Validate) Name() string

func (*Validate) Requires

func (m *Validate) Requires() []jmap.URI

type ValidateResponse

type ValidateResponse struct {
	Account jmap.ID        `json:"accountId,omitempty"`
	Error   *jmap.SetError `json:"error"`
}

Jump to

Keyboard shortcuts

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