unixdomains

package
v0.0.0-...-4450389 Latest Latest
Warning

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

Go to latest
Published: Nov 4, 2019 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var NoVC = events.NoVC
View Source
var RetryNoVC = events.RetryNoVC

Functions

func IsPackageError

func IsPackageError(err error) bool

Types

type Advancer

type Advancer struct {
	// contains filtered or unexported fields
}

The bools indicate which part of the state has been duplicated.

func (*Advancer) Advance

func (a *Advancer) Advance(s events.State, ev events.Event) events.State

type ArgumentError

type ArgumentError struct {
	Reason string
}

func (*ArgumentError) Error

func (err *ArgumentError) Error() string

type Behavior

type Behavior struct{}

func (Behavior) NewAdvancer

func (Behavior) NewAdvancer() events.Advancer

func (Behavior) NewEvent

func (Behavior) NewEvent() events.Event

func (Behavior) NewState

func (Behavior) NewState(id uuid.I) events.State

func (Behavior) Tell

func (Behavior) Tell(
	s events.State, c events.Command,
) ([]events.Event, error)

type CannotRemovePrimaryGroupError

type CannotRemovePrimaryGroupError struct {
	Gid uint32
}

func (*CannotRemovePrimaryGroupError) Error

type CmdAddGroupUser

type CmdAddGroupUser struct {
	Gid uint32
	Uid uint32
}

func (*CmdAddGroupUser) AggregateCommand

func (*CmdAddGroupUser) AggregateCommand()

type CmdCreateGroup

type CmdCreateGroup struct {
	Group string
	Gid   uint32
}

func (*CmdCreateGroup) AggregateCommand

func (*CmdCreateGroup) AggregateCommand()

type CmdCreateUser

type CmdCreateUser struct {
	User string
	Uid  uint32
	Gid  uint32
}

func (*CmdCreateUser) AggregateCommand

func (*CmdCreateUser) AggregateCommand()

type CmdDeleteGroup

type CmdDeleteGroup struct {
	Gid uint32
}

func (*CmdDeleteGroup) AggregateCommand

func (*CmdDeleteGroup) AggregateCommand()

type CmdDeleteUser

type CmdDeleteUser struct {
	Uid uint32
}

func (*CmdDeleteUser) AggregateCommand

func (*CmdDeleteUser) AggregateCommand()

type CmdInit

type CmdInit struct {
	Name string
}

func (*CmdInit) AggregateCommand

func (*CmdInit) AggregateCommand()

type CmdRemoveGroupUser

type CmdRemoveGroupUser struct {
	Gid uint32
	Uid uint32
}

func (*CmdRemoveGroupUser) AggregateCommand

func (*CmdRemoveGroupUser) AggregateCommand()

type Event

type Event struct{ uxev.Event }

func (*Event) UnmarshalProto

func (ev *Event) UnmarshalProto(data []byte) error

type EventTypeError

type EventTypeError struct{}

func (*EventTypeError) Error

func (err *EventTypeError) Error() string

type Group

type Group struct {
	Group string
	Gid   uint32
	Uids  []uint32
}

type GroupConflictError

type GroupConflictError struct {
	AGroup string
	AGid   uint32
	BGroup string
	BGid   uint32
}

func (*GroupConflictError) Error

func (err *GroupConflictError) Error() string

type InvalidCommandError

type InvalidCommandError struct{}

func (*InvalidCommandError) Error

func (err *InvalidCommandError) Error() string

type JournalError

type JournalError struct {
	Err error
}

func (*JournalError) Error

func (err *JournalError) Error() string

func (*JournalError) Unwrap

func (err *JournalError) Unwrap() error

type MissingGroupError

type MissingGroupError struct {
	Gid uint32
}

func (*MissingGroupError) Error

func (err *MissingGroupError) Error() string

type MissingUserError

type MissingUserError struct {
	Uid uint32
}

func (*MissingUserError) Error

func (err *MissingUserError) Error() string

type NewEventsError

type NewEventsError struct {
	Err error
}

func (*NewEventsError) Error

func (err *NewEventsError) Error() string

func (*NewEventsError) Unwrap

func (err *NewEventsError) Unwrap() error

type NotIdempotentError

type NotIdempotentError struct {
}

func (*NotIdempotentError) Error

func (err *NotIdempotentError) Error() string

type PreconditionError

type PreconditionError struct {
	Reason string
}

func (*PreconditionError) Error

func (err *PreconditionError) Error() string

type State

type State struct {
	// contains filtered or unexported fields
}

func (*State) AggregateState

func (*State) AggregateState()

func (*State) FindGid

func (st *State) FindGid(gid uint32) (Group, bool)

func (*State) FindUser

func (st *State) FindUser(name string) (User, bool)

func (*State) Groups

func (st *State) Groups() []Group

func (*State) Id

func (s *State) Id() uuid.I

func (*State) Name

func (st *State) Name() string

func (*State) SetVid

func (s *State) SetVid(vid ulid.I)

func (*State) Users

func (st *State) Users() []User

func (*State) Vid

func (s *State) Vid() ulid.I

type UninitializedError

type UninitializedError struct{}

func (*UninitializedError) Error

func (err *UninitializedError) Error() string

type UnixDomains

type UnixDomains struct {
	// contains filtered or unexported fields
}

func New

func New(journal *events.Journal) *UnixDomains

func (*UnixDomains) AddGroupUser

func (r *UnixDomains) AddGroupUser(
	id uuid.I, vid ulid.I, cmd *CmdAddGroupUser,
) (ulid.I, error)

func (*UnixDomains) CreateGroup

func (r *UnixDomains) CreateGroup(
	id uuid.I, vid ulid.I, group string, gid uint32,
) (ulid.I, error)

func (*UnixDomains) CreateUser

func (r *UnixDomains) CreateUser(
	id uuid.I, vid ulid.I, cmd *CmdCreateUser,
) (ulid.I, error)

func (*UnixDomains) DeleteGroup

func (r *UnixDomains) DeleteGroup(
	id uuid.I, vid ulid.I, gid uint32,
) (ulid.I, error)

func (*UnixDomains) DeleteUser

func (r *UnixDomains) DeleteUser(
	id uuid.I, vid ulid.I, uid uint32,
) (ulid.I, error)

func (*UnixDomains) FindId

func (r *UnixDomains) FindId(id uuid.I) (*State, error)

func (*UnixDomains) Init

func (r *UnixDomains) Init(id uuid.I, cmd *CmdInit) (ulid.I, error)

func (*UnixDomains) RemoveGroupUser

func (r *UnixDomains) RemoveGroupUser(
	id uuid.I, vid ulid.I, cmd *CmdRemoveGroupUser,
) (ulid.I, error)

type User

type User struct {
	User string
	Uid  uint32
	Gid  uint32
	Gids []uint32
}

type UserConflictError

type UserConflictError struct {
	AUser string
	AUid  uint32
	AGid  uint32
	BUser string
	BUid  uint32
	BGid  uint32
}

func (*UserConflictError) Error

func (err *UserConflictError) Error() string

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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