clipsight

package module
v0.4.2 Latest Latest
Warning

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

Go to latest
Published: Jun 21, 2023 License: MIT Imports: 45 Imported by: 0

README

ClipSight 

Latest GitHub release Github Actions test License

ClipSight provides an embedded site for sharing several Amazon QuickSight dashboards externally.

Install

Binary packages

Releases

Usage

Usage: clipsight <command>

Flags:
  -h, --help                     Show context-sensitive help.
      --log-level="info"         output log level ($CLIPSIGHT_LOG_LEVEL)
      --ddb-table="clipsight"    DynamoDB table name for user infomation ($CLIPSIGHT_DDB_TABLE)

Commands:
  register --email=STRING --namespace="default" --iam-role-arn=STRING --region=STRING
    Register user

  grant --email=STRING --dashboard-id=STRING
    grant dashboard view auth to user

  revoke --email=STRING --dashboard-id=STRING
    revoke dashboard view auth from user

  serve
    Start a ClipSight server

  plan --config-path="."
    Plan of sync config and DynamoDB

  apply --config-path="."
    Apply sync config and DynamoDB

  version
    Show version

Run "clipsight <command> --help" for more information on a command.

Permission management as a code

ClipSight provides a command to manage user permissions as a code.

for example, can manage user permissions with a yaml file like this.

required_version: ">=0.0.0"

users:
  - email: "tora@example.com"
    namespace: "external"
    iam_role_arn: "{{ must_env `IAM_ROLE_ARN` }}"
    region: "{{ must_env `AWS_REGION` }}"
    dashboards:
      - dashboard_id: 12345678-1234-1234-1234-123456789012
        expire: "2021-01-01T00:00:00Z"
    enabled: true
  - email: "piyo@example.com"
    iam_role_arn: "{{ must_env `IAM_ROLE_ARN` }}"
    dashboards:
      - dashboard_id: 12345678-1234-1234-1234-123456789012
        expire: "2021-01-01T00:00:00Z"
      - dashboard_id: 00000000-0000-0000-0000-000000000000
    enabled: true

yaml files can be split. read all files with --config-path option.

modify plan and apply with clipsight plan and clipsight apply command.

$ clipsight plan --config-path /path/to/config
$ clipsight apply --config-path /path/to/config

LICENSE

MIT License

Copyright (c) 2023 IKEDA Masashi

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	LevelDebug  slog.Level = slog.LevelDebug
	LevelInfo              = slog.LevelInfo
	LevelNotice            = slog.Level(slog.LevelInfo + 2)
	LevelWarn              = slog.LevelWarn
	LevelError             = slog.LevelError
)
View Source
var Version string = "current"

Functions

func GetIAMRoleName

func GetIAMRoleName(arnStr string) (string, error)

func ListContains added in v0.3.0

func ListContains[T equalable[T]](list []T, item T) bool

func ListDiff added in v0.3.0

func ListDiff[T equalable[T]](a []T, b []T) (added []T, changes []T, removed []T)

func ListPickup added in v0.3.0

func ListPickup[T equalable[T]](list []T, item T) (T, bool)

func ParseIAMRoleARN

func ParseIAMRoleARN(arnStr string) (*arn.ARN, error)

func RunCLI

func RunCLI(ctx context.Context, args []string) error

func WithUser

func WithUser(ctx context.Context, user *User) context.Context

WithUser appends context into clipsight user instance

Types

type ApplyOption added in v0.2.0

type ApplyOption struct {
	PlanOption
	AutoApprove bool `help:"auto approve"`
}

type AssignGroupOption added in v0.3.0

type AssignGroupOption struct {
	GroupID string `help:"assign target group id" required:""`
	Email   string `help:"user email address" required:""`
}

type CLI

type CLI struct {
	LogLevel      string               `help:"output log level" env:"CLIPSIGHT_LOG_LEVEL" default:"info"`
	DDBTable      string               `help:"DynamoDB table name for user infomation" env:"CLIPSIGHT_DDB_TABLE" default:"clipsight"`
	MaskEmail     bool                 `help:"mask email address in log"`
	Register      *RegisterOption      `cmd:"" help:"Register user"`
	Grant         *GrantOption         `cmd:"" help:"grant dashboard view auth to user or group"`
	Revoke        *RevokeOption        `cmd:"" help:"revoke dashboard view auth from user or group"`
	Serve         *ServeOption         `cmd:"" help:"Start a ClipSight server" default:"withargs"`
	Plan          *PlanOption          `cmd:"" help:"Plan of sync config and DynamoDB"`
	Apply         *ApplyOption         `cmd:"" help:"Apply sync config and DynamoDB"`
	CreateGroup   *CreateGroupOption   `cmd:"" help:"Create group"`
	DeleteGroup   *DeleteGroupOption   `cmd:"" help:"Delete group"`
	AssignGroup   *AssignGroupOption   `cmd:"" help:"Assign user to group"`
	UnassignGroup *UnassignGroupOption `cmd:"" help:"Unassign user from group"`
	Version       struct{}             `cmd:"" help:"Show version"`
}

type ChangeInfo added in v0.2.0

type ChangeInfo struct {
	BeforeGroup *Group
	AfterGroup  *Group
	BeforeUser  *User
	AfterUser   *User
}

func (*ChangeInfo) Email added in v0.3.0

func (c *ChangeInfo) Email() Email

func (*ChangeInfo) GroupID added in v0.3.0

func (c *ChangeInfo) GroupID() string

func (*ChangeInfo) IsGroupChange added in v0.3.0

func (c *ChangeInfo) IsGroupChange() bool

func (*ChangeInfo) IsUserChange added in v0.3.0

func (c *ChangeInfo) IsUserChange() bool

func (*ChangeInfo) NeedCreateGroup added in v0.3.0

func (c *ChangeInfo) NeedCreateGroup() bool

func (*ChangeInfo) NeedDeleteGroup added in v0.3.0

func (c *ChangeInfo) NeedDeleteGroup() bool

func (*ChangeInfo) NeedDeregister added in v0.2.0

func (c *ChangeInfo) NeedDeregister() bool

func (*ChangeInfo) NeedGroupModify added in v0.3.0

func (c *ChangeInfo) NeedGroupModify() bool

func (*ChangeInfo) NeedPermissionModify added in v0.2.0

func (c *ChangeInfo) NeedPermissionModify() bool

func (*ChangeInfo) NeedRegister added in v0.2.0

func (c *ChangeInfo) NeedRegister() bool

func (*ChangeInfo) String added in v0.2.0

func (c *ChangeInfo) String() string

func (*ChangeInfo) UnmaskString added in v0.2.0

func (c *ChangeInfo) UnmaskString() string

func (*ChangeInfo) UserID added in v0.3.0

func (c *ChangeInfo) UserID() string

type ClipSight

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

Clipsight is Application instance for resource lifecycle

func New

func New(ctx context.Context, ddbTableName string, maskEmail bool) (*ClipSight, error)

New returns initialized application instance

func (*ClipSight) AssignUserToGroup added in v0.3.0

func (app *ClipSight) AssignUserToGroup(ctx context.Context, user *User, group *Group) error

func (*ClipSight) CreateGroupMemberShip added in v0.3.0

func (app *ClipSight) CreateGroupMemberShip(ctx context.Context, user *User, group *Group) error

func (*ClipSight) CreateQuickSightGroup added in v0.3.0

func (app *ClipSight) CreateQuickSightGroup(ctx context.Context, group *Group) (*types.Group, error)

func (*ClipSight) DeleteGroup added in v0.3.0

func (app *ClipSight) DeleteGroup(ctx context.Context, group *Group) error

func (*ClipSight) DeleteGroupMemberShip added in v0.3.0

func (app *ClipSight) DeleteGroupMemberShip(ctx context.Context, user *User, group *Group) error

func (*ClipSight) DeleteQuickSightGroup added in v0.3.0

func (app *ClipSight) DeleteQuickSightGroup(ctx context.Context, group *Group) error

func (*ClipSight) DeleteQuickSightUser added in v0.2.0

func (app *ClipSight) DeleteQuickSightUser(ctx context.Context, user *User) error

func (*ClipSight) DeleteUser added in v0.2.0

func (app *ClipSight) DeleteUser(ctx context.Context, user *User) error

func (*ClipSight) DescribeDashboard

func (app *ClipSight) DescribeDashboard(ctx context.Context, dashboardID string) (*types.Dashboard, bool, error)

func (*ClipSight) DescribeDashboardParmissions

func (app *ClipSight) DescribeDashboardParmissions(ctx context.Context, dashboardID string) ([]types.ResourcePermission, error)

func (*ClipSight) DescribeGroupMemberShip added in v0.3.0

func (app *ClipSight) DescribeGroupMemberShip(ctx context.Context, user *User, group *Group) (bool, error)

func (*ClipSight) DescribeQuickSightGroup added in v0.3.0

func (app *ClipSight) DescribeQuickSightGroup(ctx context.Context, group *Group) (*types.Group, bool, error)

func (*ClipSight) DescribeQuickSightUser

func (app *ClipSight) DescribeQuickSightUser(ctx context.Context, user *User) (*types.User, bool, error)

func (*ClipSight) Dispatch

func (app *ClipSight) Dispatch(ctx context.Context, command string, cli *CLI) error

func (*ClipSight) GetGroup added in v0.3.0

func (app *ClipSight) GetGroup(ctx context.Context, groupID string) (*Group, bool, error)

func (*ClipSight) GetUser

func (app *ClipSight) GetUser(ctx context.Context, email Email) (*User, bool, error)

func (*ClipSight) GetVisibleDashboardIDs added in v0.3.0

func (app *ClipSight) GetVisibleDashboardIDs(ctx context.Context, user *User) ([]string, error)

func (*ClipSight) GrantDashboardParmission

func (app *ClipSight) GrantDashboardParmission(ctx context.Context, dashboardID string, principalARN string) error

func (*ClipSight) GrantDashboardToGroup added in v0.3.0

func (app *ClipSight) GrantDashboardToGroup(ctx context.Context, group *Group, dashboardID string, expire time.Time) error

func (*ClipSight) GrantDashboardToUser

func (app *ClipSight) GrantDashboardToUser(ctx context.Context, user *User, dashboardID string, expire time.Time) error

func (*ClipSight) ListGroups added in v0.3.0

func (app *ClipSight) ListGroups(ctx context.Context) (<-chan *Group, func())

func (*ClipSight) ListUsers added in v0.2.0

func (app *ClipSight) ListUsers(ctx context.Context) (<-chan *User, func())

func (*ClipSight) NewAuthMiddleware

func (app *ClipSight) NewAuthMiddleware(ctx context.Context, opt *ServeOption) (func(http.Handler) http.Handler, error)

func (*ClipSight) NewQuickSightClientWithUser

func (app *ClipSight) NewQuickSightClientWithUser(ctx context.Context, user *User) (*quicksight.Client, error)

func (*ClipSight) PlanSyncConfigToDynamoDB added in v0.2.0

func (app *ClipSight) PlanSyncConfigToDynamoDB(ctx context.Context, cfg *Config, silent bool) ([]*ChangeInfo, error)

func (*ClipSight) RegisterQuickSightUser

func (app *ClipSight) RegisterQuickSightUser(ctx context.Context, user *User, role string) (*types.User, error)

func (*ClipSight) RevokeDashboardFromGroup added in v0.3.0

func (app *ClipSight) RevokeDashboardFromGroup(ctx context.Context, group *Group, dashboardID string) error

func (*ClipSight) RevokeDashboardFromUser

func (app *ClipSight) RevokeDashboardFromUser(ctx context.Context, user *User, dashboardID string) error

func (*ClipSight) RevokeDashboardParmission

func (app *ClipSight) RevokeDashboardParmission(ctx context.Context, dashboardID string, principalARN string) error

func (*ClipSight) RunApply added in v0.2.0

func (app *ClipSight) RunApply(ctx context.Context, opt *ApplyOption) error

func (*ClipSight) RunAssignGroup added in v0.3.0

func (app *ClipSight) RunAssignGroup(ctx context.Context, opt *AssignGroupOption) error

func (*ClipSight) RunCreateGroup added in v0.3.0

func (app *ClipSight) RunCreateGroup(ctx context.Context, opt *CreateGroupOption) error

func (*ClipSight) RunDeleteGroup added in v0.3.0

func (app *ClipSight) RunDeleteGroup(ctx context.Context, opt *DeleteGroupOption) error

func (*ClipSight) RunDeregister added in v0.2.0

func (app *ClipSight) RunDeregister(ctx context.Context, opt *DeregisterOption) error

func (*ClipSight) RunGrant

func (app *ClipSight) RunGrant(ctx context.Context, opt *GrantOption) error

func (*ClipSight) RunPlan added in v0.2.0

func (app *ClipSight) RunPlan(ctx context.Context, opt *PlanOption) error

func (*ClipSight) RunRegister

func (app *ClipSight) RunRegister(ctx context.Context, opt *RegisterOption) error

func (*ClipSight) RunRevoke

func (app *ClipSight) RunRevoke(ctx context.Context, opt *RevokeOption) error

func (*ClipSight) RunServe

func (app *ClipSight) RunServe(ctx context.Context, opt *ServeOption) error

func (*ClipSight) RunUnassignGroup added in v0.3.0

func (app *ClipSight) RunUnassignGroup(ctx context.Context, opt *UnassignGroupOption) error

func (*ClipSight) SaveGroup added in v0.3.0

func (app *ClipSight) SaveGroup(ctx context.Context, group *Group) error

func (*ClipSight) SaveUser

func (app *ClipSight) SaveUser(ctx context.Context, user *User) error

func (*ClipSight) UnassignUserToGroup added in v0.3.0

func (app *ClipSight) UnassignUserToGroup(ctx context.Context, user *User, group *Group) error

type Config added in v0.2.0

type Config struct {
	RequiredVersion VersionConstraint `yaml:"required_version"`
	Users           []*User           `yaml:"users"`
	Groups          []*Group          `yaml:"groups"`
}

func LoadConfig added in v0.2.0

func LoadConfig(p string) (*Config, error)

func (*Config) Merge added in v0.2.0

func (c *Config) Merge(other *Config)

func (*Config) Validate added in v0.2.0

func (c *Config) Validate() error

type CreateGroupOption added in v0.3.0

type CreateGroupOption struct {
	GroupID               string    `help:"group id"`
	Namespace             string    `help:"quicksight namespace" default:"default" required:""`
	Region                string    `help:"quicksight user region" env:"AWS_DEFAULT_REGION" required:""`
	CreateQuickSightGroup bool      `name:"create-quicksight-group" help:"if quicksight group not exists, create this"`
	ExpireDate            time.Time `help:"Expiration date for this group (RFC3399)"`
	Disabled              bool      `help:"disable user"`
}

CreateGroupOption is Options for CLI Serve command

type Dashboard

type Dashboard struct {
	DashboardID string    `dynamodb:"DashboardID" yaml:"dashboard_id" json:"dashboard_id"`
	Expire      time.Time `dynamodb:"Expire,unixtime" yaml:"expire" json:"expire,omitempty"`
}

func (*Dashboard) EqualIdentifiers added in v0.3.0

func (d *Dashboard) EqualIdentifiers(other *Dashboard) bool

func (*Dashboard) Equals added in v0.3.0

func (d *Dashboard) Equals(other *Dashboard) bool

func (*Dashboard) IsVisible

func (d *Dashboard) IsVisible() bool

type DeleteGroupOption added in v0.3.0

type DeleteGroupOption struct {
	GroupID             string `help:"group id to delete"`
	DisableOnly         bool   `name:"disable-only" help:"only disable group, not delete"`
	KeepQuickSightGroup bool   `name:"keep-quicksight-group" help:"if quicksight user exists, not delete this"`
	SetTTLOnly          bool   `name:"set-ttl-only" help:"only set ttl, not "`
}

type DeregisterOption added in v0.2.0

type DeregisterOption struct {
	Email              string `help:"user email address" required:""`
	DisableOnly        bool   `name:"disable-only" help:"only disable user, not deregister"`
	KeepQuickSightUser bool   `name:"keep-quicksight-user" help:"if quicksight user exists, not deregister this"`
	SetTTLOnly         bool   `name:"set-ttl-only" help:"only set ttl, not deregister"`
}

type Email

type Email string

func (Email) String

func (email Email) String() string

func (Email) Validate

func (email Email) Validate() error

type ErrorResponse added in v0.3.0

type ErrorResponse struct {
	Status int    `json:"status"`
	Code   string `json:"code"`
	Detail string `json:"detail"`
	// contains filtered or unexported fields
}

func (*ErrorResponse) Error added in v0.3.0

func (e *ErrorResponse) Error() string

func (*ErrorResponse) Unwrap added in v0.3.0

func (e *ErrorResponse) Unwrap() error

type GrantOption

type GrantOption struct {
	Email       string    `help:"user email address"`
	GroupID     string    `help:"grant target group id"`
	DashboardID string    `help:"grant target dashboard id" required:""`
	ExpireDate  time.Time `help:"Expiration date for this user (RFC3399)"`
}

type Group added in v0.3.0

type Group struct {
	ID                 string       `dynamodb:"ID" yaml:"id" json:"id"`
	Namespace          string       `dynamodb:"Namespace" yaml:"namespace" json:"namespace"`
	Dashboards         []*Dashboard `dynamodb:"Dashboards" yaml:"dashboards" json:"dashboards"`
	Region             string       `dynamodb:"Region" yaml:"region" json:"region"`
	Enabled            bool         `dynamodb:"Enabled" yaml:"enabled" json:"enabled"`
	CreatedAt          time.Time    `dynamodb:"CreatedAt,unixtime" yaml:"-" json:"-"`
	UpdatedAt          time.Time    `dynamodb:"UpdatedAt,unixtime" yaml:"-" json:"-"`
	QuickSightGroupARN string       `dynamodb:"QuickSightGroupARN" yaml:"-" json:"-"`
	// contains filtered or unexported fields
}

func NewGroup added in v0.3.0

func NewGroup(groupID string) *Group

func (*Group) Diff added in v0.3.0

func (g *Group) Diff(group *Group) (string, error)

func (*Group) DiffPermissions added in v0.3.0

func (g *Group) DiffPermissions(other *Group) ([]*Dashboard, []*Dashboard)

func (*Group) EqualDashboardPermissions added in v0.3.0

func (g *Group) EqualDashboardPermissions(other *Group) bool

func (*Group) EqualIdentifiers added in v0.3.0

func (g *Group) EqualIdentifiers(other *Group) bool

func (*Group) Equals added in v0.3.0

func (g *Group) Equals(other *Group) bool

func (*Group) FillKey added in v0.3.0

func (g *Group) FillKey() *Group

func (*Group) GrantDashboard added in v0.3.0

func (g *Group) GrantDashboard(dashboard *types.Dashboard, expire time.Time)

func (*Group) HasChanges added in v0.3.0

func (g *Group) HasChanges(other *Group) bool

func (*Group) IsActive added in v0.3.0

func (g *Group) IsActive() bool

func (*Group) IsExpire added in v0.3.0

func (s *Group) IsExpire() bool

func (*Group) IsNew added in v0.3.0

func (g *Group) IsNew() bool

func (*Group) Restrict added in v0.3.0

func (g *Group) Restrict() error

func (*Group) RevokeDashboard added in v0.3.0

func (g *Group) RevokeDashboard(dashboardID string) bool

type PlanOption added in v0.2.0

type PlanOption struct {
	ConfigPath string `help:"config file path" required:"" default:"."`
	Silent     bool   `help:"silent mode"`
	Format     string `help:"output format" default:"text" enum:"text,markdown"`
}

type RegisterOption

type RegisterOption struct {
	ID                     string    `help:"user id"`
	Email                  string    `help:"user email address" required:""`
	Namespace              string    `help:"quicksight namespace" default:"default" required:""`
	IAMRoleARN             string    `help:"IAM Role arn for quicksight user" required:""`
	Region                 string    `help:"quicksight user region" env:"AWS_DEFAULT_REGION" required:""`
	RegisterQuickSightUser bool      `name:"register-quicksight-user" help:"if quicksight user not exists, register this"`
	ProvisioningAs         string    `name:"provisioning-as" help:"provisioning as quicksight user if not exists" default:"Reader" enum:"Reader,Author,Admin"`
	CanConsole             bool      `name:"can-console" help:"can login quicksight console"`
	ExpireDate             time.Time `help:"Expiration date for this user (RFC3399)"`
	Disabled               bool      `help:"disable user"`
}

RegisterOption is Options for CLI Serve command

type RevokeOption

type RevokeOption struct {
	GroupID     string `help:"revoke target group id"`
	Email       string `help:"user email address"`
	DashboardID string `help:"revoke target dashboard id" required:""`
}

type ServeOption

type ServeOption struct {
	BaseURL                     *url.URL `help:"site base url" env:"CLIPSIGHT_BASE_URL" default:"http://localhost:8080"`
	Addr                        string   `help:"local server address" env:"CLIPSIGHT_ADDR" default:":8080"`
	Prefix                      string   `help:"site prefix" default:"/" env:"CLIPSIGHT_PREFIX"`
	APIOnly                     bool     `help:"API only mode" env:"CLIPSIGHT_API_ONLY"`
	PublicPath                  string   `help:"Public path for static files" default:"" env:"CLIPSIGHT_PUBLIC_PATH"`
	EnableIndexFallback         bool     `help:"Enable index fallback" env:"CLIPSIGHT_ENABLE_INDEX_FALLBACK"`
	AuthType                    string   `help:"Types of Authentication" enum:"google,aws,none,dummy" default:"google" env:"CLIPSIGHT_AUTH_TYPE"`
	GoogleClientID              string   `help:"google client id for auth type is google" env:"GOOGLE_CLIENT_ID"`
	GoogleClientSecret          string   `help:"google client secret for auth type is google" env:"GOOGLE_CLIENT_SECRET"`
	GoogleOIDCSessionEncryptKey string   `help:"session encrypt key for google auth" env:"GOOGLE_OIDC_SESSION_ENCRYPT_KEY"`
	AuthHeader                  string   `help:"auth header name for auth type is none" env:"CLIPSIGHT_AUTH_HEADER" default:"ClipSight-Auth-Email"`
	DummyEmail                  string   `help:"dummy email for auth type is none" env:"CLIPSIGHT_DUMMY_EMAIL" default:""`
	EnableConsole               bool     `help:"enable quicksight console" env:"CLIPSIGHT_ENABLE_CONSOLE"`
}

ServeOption is Options for CLI Serve command

type UnassignGroupOption added in v0.3.0

type UnassignGroupOption struct {
	GroupID string `help:"unassign target group id" required:""`
	Email   string `help:"user email address" required:""`
}

type User

type User struct {
	ID                string                `dynamodb:"ID" yaml:"id" json:"id"`
	Email             Email                 `dynamodb:"Email" yaml:"email" json:"email"`
	Namespace         string                `dynamodb:"Namespace" yaml:"namespace" json:"namespace"`
	IAMRoleARN        string                `dynamodb:"IAMRoleARN" yaml:"iam_role_arn" json:"iam_role_arn"`
	Region            string                `dynamodb:"Region" yaml:"region" json:"region"`
	Dashboards        []*Dashboard          `dynamodb:"Dashboards" yaml:"dashboards" json:"dashboards"`
	Groups            []UserGroupMembership `dynamodb:"Groups" yaml:"groups" json:"groups"`
	Enabled           bool                  `dynamodb:"Enabled" yaml:"enabled" json:"enabled"`
	ProvisioningAs    string                `dynamodb:"-" yaml:"provisioning_as,omitempty" json:"provisioning_as,omitempty"`
	CanConsole        bool                  `dynamodb:"CanConsole" yaml:"can_console" json:"can_console"`
	CreatedAt         time.Time             `dynamodb:"CreatedAt,unixtime" yaml:"-" json:"-"`
	UpdatedAt         time.Time             `dynamodb:"UpdatedAt,unixtime" yaml:"-" json:"-"`
	QuickSightUserARN string                `dynamodb:"QuickSightUserARN" yaml:"-" json:"-"`
	// contains filtered or unexported fields
}

func GetUserFromContext

func GetUserFromContext(ctx context.Context) (*User, bool)

func NewUser

func NewUser(email Email) *User

func (*User) Diff added in v0.2.0

func (u *User) Diff(user *User, maskEmail bool) (string, error)

func (*User) DiffGroups added in v0.3.0

func (u *User) DiffGroups(other *User) ([]UserGroupMembership, []UserGroupMembership)

func (*User) DiffPermissions added in v0.2.0

func (u *User) DiffPermissions(other *User) ([]*Dashboard, []*Dashboard)

func (*User) EqualDashboardPermissions added in v0.2.0

func (u *User) EqualDashboardPermissions(user *User) bool

func (*User) EqualGroups added in v0.3.0

func (u *User) EqualGroups(user *User) bool

func (*User) EqualIdentifiers added in v0.3.0

func (u *User) EqualIdentifiers(user *User) bool

func (*User) Equals added in v0.2.0

func (u *User) Equals(user *User) bool

func (*User) FillKey

func (u *User) FillKey() *User

func (*User) GetDashboard added in v0.2.0

func (u *User) GetDashboard(id string) (*Dashboard, bool)

func (*User) GrantDashboard

func (u *User) GrantDashboard(dashboard *types.Dashboard, expire time.Time)

func (*User) HasChanges added in v0.3.0

func (u *User) HasChanges(user *User) bool

func (*User) IsActive

func (u *User) IsActive() bool

func (*User) IsExpire

func (s *User) IsExpire() bool

func (*User) IsNew

func (u *User) IsNew() bool

func (*User) QuickSightUserName

func (u *User) QuickSightUserName() (string, error)

func (*User) Restrict added in v0.2.0

func (u *User) Restrict() error

func (*User) RevokeDashboard

func (u *User) RevokeDashboard(dashboardID string) bool

type UserGroupMembership added in v0.3.0

type UserGroupMembership string

func (UserGroupMembership) EqualIdentifiers added in v0.3.0

func (m UserGroupMembership) EqualIdentifiers(other UserGroupMembership) bool

func (UserGroupMembership) Equals added in v0.3.0

func (UserGroupMembership) GroupID added in v0.3.0

func (m UserGroupMembership) GroupID() string

type VersionConstraint added in v0.2.0

type VersionConstraint struct {
	gv.Constraints
}

func (*VersionConstraint) Check added in v0.2.0

func (c *VersionConstraint) Check(v string) bool

func (*VersionConstraint) UnmarshalYAML added in v0.2.0

func (c *VersionConstraint) UnmarshalYAML(node *yaml.Node) error

Directories

Path Synopsis
cmd

Jump to

Keyboard shortcuts

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