server

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: 15 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
	UseTLS       bool
	CertPath     string
	KeyPath      string
	BindHost     string
	BindPort     int
	ServiceName  string
	BootstrapKey string
}

func ConfigFromOpts

func ConfigFromOpts() *Config

type Server

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

func New

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

func (*Server) Bootstrap

func (s *Server) Bootstrap(
	ctx context.Context,
	req *pb.BootstrapRequest,
) (*pb.BootstrapResponse, error)

Bootstrap checks a bootstrap key and creates a user with SUPER privileges

func (*Server) Close

func (s *Server) Close()

func (*Server) OrganizationDelete

func (s *Server) OrganizationDelete(
	ctx context.Context,
	req *pb.OrganizationDeleteRequest,
) (*pb.OrganizationDeleteResponse, error)

Deletes an organization, all of its owned resources and membership records

func (*Server) OrganizationGet

func (s *Server) OrganizationGet(
	ctx context.Context,
	req *pb.OrganizationGetRequest,
) (*pb.Organization, error)

OrganizationGet looks up a organization record by organization identifier and returns the Organization protobuf message for the organization

func (*Server) OrganizationList

func (s *Server) OrganizationList(
	req *pb.OrganizationListRequest,
	stream pb.IAM_OrganizationListServer,
) error

OrganizationList looks up zero or more organization records matching supplied filters and streams Organization messages back to the caller

func (*Server) OrganizationMembersList

func (s *Server) OrganizationMembersList(
	req *pb.OrganizationMembersListRequest,
	stream pb.IAM_OrganizationMembersListServer,
) error

Return the users in an organization

func (*Server) OrganizationMembersSet

func (s *Server) OrganizationMembersSet(
	ctx context.Context,
	req *pb.OrganizationMembersSetRequest,
) (*pb.OrganizationMembersSetResponse, error)

Add or remove users from an organization

func (*Server) OrganizationSet

func (s *Server) OrganizationSet(
	ctx context.Context,
	req *pb.OrganizationSetRequest,
) (*pb.OrganizationSetResponse, error)

OrganizationSet creates a new organization or updates an existing organization

func (*Server) RoleDelete

func (s *Server) RoleDelete(
	ctx context.Context,
	req *pb.RoleDeleteRequest,
) (*pb.RoleDeleteResponse, error)

Deletes a role, all of its permission and user association records

func (*Server) RoleGet

func (s *Server) RoleGet(
	ctx context.Context,
	req *pb.RoleGetRequest,
) (*pb.Role, error)

RoleGet looks up a organization record by organization identifier and returns the Role protobuf message for the organization

func (*Server) RoleList

func (s *Server) RoleList(
	req *pb.RoleListRequest,
	stream pb.IAM_RoleListServer,
) error

RoleList looks up zero or more role records matching supplied filters and streams Role messages back to the caller

func (*Server) RoleSet

func (s *Server) RoleSet(
	ctx context.Context,
	req *pb.RoleSetRequest,
) (*pb.RoleSetResponse, error)

RoleSet creates a new role or updates an existing role

func (*Server) UserDelete

func (s *Server) UserDelete(
	ctx context.Context,
	req *pb.UserDeleteRequest,
) (*pb.UserDeleteResponse, error)

Deletes a user, all of its membership records and owned resources

func (*Server) UserGet

func (s *Server) UserGet(
	ctx context.Context,
	req *pb.UserGetRequest,
) (*pb.User, error)

UserGet looks up a user record by user identifier and returns the User protobuf message for the user

func (*Server) UserList

func (s *Server) UserList(
	req *pb.UserListRequest,
	stream pb.IAM_UserListServer,
) error

UserList looks up zero or more user records matching supplied filters and streams User messages back to the caller

func (*Server) UserMembersList

func (s *Server) UserMembersList(
	req *pb.UserMembersListRequest,
	stream pb.IAM_UserMembersListServer,
) error

Return the organizations a user is a member of

func (*Server) UserRolesList

func (s *Server) UserRolesList(
	req *pb.UserRolesListRequest,
	stream pb.IAM_UserRolesListServer,
) error

Return the roles a user has

func (*Server) UserRolesSet

func (s *Server) UserRolesSet(
	ctx context.Context,
	req *pb.UserRolesSetRequest,
) (*pb.UserRolesSetResponse, error)

Add or remove roles from a user

func (*Server) UserSet

func (s *Server) UserSet(
	ctx context.Context,
	req *pb.UserSetRequest,
) (*pb.UserSetResponse, error)

UserSet creates a new user or updates an existing user

Jump to

Keyboard shortcuts

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