iamstorage

package
v0.0.0-...-0aebffb Latest Latest
Warning

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

Go to latest
Published: Oct 21, 2017 License: Apache-2.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	DSN                   string
	ConnectTimeoutSeconds int
}

type IAMStorage

type IAMStorage struct {
	*storage.Storage
	// contains filtered or unexported fields
}

func New

func New(
	cfg *Config,
	log *logging.Logs,
) (*IAMStorage, error)

func (*IAMStorage) OrganizationCreate

func (s *IAMStorage) OrganizationCreate(
	sess *pb.Session,
	fields *pb.OrganizationSetFields,
) (*pb.Organization, error)

Creates a new record for an organization

func (*IAMStorage) OrganizationDelete

func (s *IAMStorage) OrganizationDelete(
	sess *pb.Session,
	search string,
) error

Deletes an organization, all organization members and child organizations, and any resources the organization owns

func (*IAMStorage) OrganizationGet

func (s *IAMStorage) OrganizationGet(
	search string,
) (*pb.Organization, error)

Returns a pb.Organization record filled with information about a requested organization.

func (*IAMStorage) OrganizationList

func (s *IAMStorage) OrganizationList(
	req *pb.OrganizationListRequest,
) (storage.RowIterator, error)

Returns a RowIterator yielding organizations matching a set of supplied filters

func (*IAMStorage) OrganizationMembersList

func (s *IAMStorage) OrganizationMembersList(
	req *pb.OrganizationMembersListRequest,
) (storage.RowIterator, error)

Returns the users belonging to an organization

func (*IAMStorage) OrganizationMembersSet

func (s *IAMStorage) OrganizationMembersSet(
	req *pb.OrganizationMembersSetRequest,
) (uint64, uint64, error)

INSERTs and DELETEs user to organization mapping records. Returns the number of users added and removed to/from the organization.

func (*IAMStorage) OrganizationUpdate

func (s *IAMStorage) OrganizationUpdate(
	before *pb.Organization,
	changed *pb.OrganizationSetFields,
) (*pb.Organization, error)

Updates information for an existing organization by examining the fields changed to the current fields values

func (*IAMStorage) RoleCreate

func (s *IAMStorage) RoleCreate(
	sess *pb.Session,
	fields *pb.RoleSetFields,
) (*pb.Role, error)

Creates a new record for an role

func (*IAMStorage) RoleDelete

func (s *IAMStorage) RoleDelete(
	search string,
) error

Deletes a role, their membership in any organizations and all resources they have created. Also deletes root organizations that only the role is a member of.

func (*IAMStorage) RoleGet

func (s *IAMStorage) RoleGet(
	search string,
) (*pb.Role, error)

Returns a pb.Role message filled with information about a requested role

func (*IAMStorage) RoleList

func (s *IAMStorage) RoleList(
	req *pb.RoleListRequest,
) (storage.RowIterator, error)

Returns a storage.RowIterator yielding roles matching a set of supplied filters

func (*IAMStorage) RoleUpdate

func (s *IAMStorage) RoleUpdate(
	before *pb.Role,
	changed *pb.RoleSetFields,
) (*pb.Role, error)

Updates information for an existing role by examining the fields changed to the current fields values

func (*IAMStorage) UserCreate

func (s *IAMStorage) UserCreate(
	fields *pb.UserSetFields,
) (*pb.User, error)

Creates a new record for a user

func (*IAMStorage) UserDelete

func (s *IAMStorage) UserDelete(
	search string,
) error

Deletes a user, their membership in any organizations and all resources they have created. Also deletes root organizations that only the user is a member of.

func (*IAMStorage) UserGet

func (s *IAMStorage) UserGet(
	search string,
) (*pb.User, error)

Returns a pb.User record filled with information about a requested user.

func (*IAMStorage) UserList

func (s *IAMStorage) UserList(
	req *pb.UserListRequest,
) (storage.RowIterator, error)

Returns a sql.Rows yielding users matching a set of supplied filters

func (*IAMStorage) UserMembersList

func (s *IAMStorage) UserMembersList(
	req *pb.UserMembersListRequest,
) (storage.RowIterator, error)

Returns the organizations a user belongs to

func (*IAMStorage) UserPermissionsGet

func (s *IAMStorage) UserPermissionsGet(
	search string,
) (*pb.UserPermissions, error)

Returns the a user along with the user's permissions

func (*IAMStorage) UserRolesList

func (s *IAMStorage) UserRolesList(
	req *pb.UserRolesListRequest,
) (storage.RowIterator, error)

Returns the roles a user has

func (*IAMStorage) UserRolesSet

func (s *IAMStorage) UserRolesSet(
	req *pb.UserRolesSetRequest,
) (uint64, uint64, error)

INSERTs and DELETEs user to role mapping records. Returns the number of roles added and removed to/from the user.

func (*IAMStorage) UserUpdate

func (s *IAMStorage) UserUpdate(
	before *pb.User,
	changed *pb.UserSetFields,
) (*pb.User, error)

Sets information for a user

Jump to

Keyboard shortcuts

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