iam

package
v0.0.6 Latest Latest
Warning

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

Go to latest
Published: Feb 16, 2021 License: MPL-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var RoleTables = []interface{}{
	&Role{},
	&RolePermission{},
}
View Source
var ServiceAccountTables = []interface{}{
	&ServiceAccount{},
}

Functions

func NewClient

func NewClient(db *database.Database, log *zap.Logger,
	projectID string) (resource.ClientInterface, error)

Types

type Client

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

func (*Client) CollectResource

func (c *Client) CollectResource(resource string, config interface{}) error

type Role

type Role struct {
	ID                  uint `gorm:"primarykey"`
	ProjectID           string
	Region              string
	Deleted             bool
	Description         string
	Etag                string
	IncludedPermissions []*RolePermission `gorm:"constraint:OnDelete:CASCADE;"`
	Name                string
	Stage               string
	Title               string
}

func (Role) TableName

func (Role) TableName() string

type RolePermission

type RolePermission struct {
	ID        uint   `gorm:"primarykey"`
	RoleID    uint   `neo:"ignore"`
	ProjectID string `gorm:"-"`
	Value     string
}

func (RolePermission) TableName

func (RolePermission) TableName() string

type ServiceAccount

type ServiceAccount struct {
	ID             uint   `gorm:"primarykey"`
	ProjectID      string `neo:"unique"`
	Region         string
	Description    string
	Disabled       bool
	DisplayName    string
	Email          string
	Etag           string
	Name           string
	Oauth2ClientId string
	UniqueId       string `neo:"unique"`
}

func (ServiceAccount) TableName

func (ServiceAccount) TableName() string

Jump to

Keyboard shortcuts

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