memberships

package
v1.1.13 Latest Latest
Warning

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

Go to latest
Published: Oct 20, 2023 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Create

func Create(ctx context.ServiceContext, client *clients.GQLClient, options *CreateOptions) error

Create a new membership

func CreateWithUserID

func CreateWithUserID(ctx context.ServiceContext, client *clients.GQLClient, options *CreateOptions) error

Create a new membership

func GetKey

func GetKey(ctx context.ServiceContext, client *clients.GQLClient, options *GetKeyOptions) ([]byte, error)

Get a membership by ID

Types

type CreateOptions

type CreateOptions struct {
	UserID string `json:"user_id,omitempty"`
	OrgID  string `json:"org_id,omitempty"`
	RoleID string `json:"role_id,omitempty"`
	Key    string `json:"key,omitempty"`
}

type GetKeyOptions

type GetKeyOptions struct {
	UserID string `json:"user_id,omitempty"`
	OrgID  string `json:"org_id,omitempty"`
}

type Membership

type Membership struct {
	ID        string    `json:"id,omitempty"`
	CreatedAt time.Time `json:"created_at,omitempty"`
	UpdatedAt time.Time `json:"updated_at,omitempty"`

	UserID string `json:"user_id,omitempty"`
	OrgID  string `json:"org_id,omitempty"`
	RoleID string `json:"role_id,omitempty"`

	Key string `json:"key,omitempty"`
}

func Get

func Get(ctx context.ServiceContext, client *clients.GQLClient, id string) (*Membership, error)

Get a membership by ID

func (*Membership) Marshal

func (w *Membership) Marshal() ([]byte, error)

func (*Membership) Unmarshal

func (w *Membership) Unmarshal(data []byte) error

type UpdateInviteLimitOptions

type UpdateInviteLimitOptions struct {
	ID               string
	IncrementLimitBy int
}

type UpdateOptions

type UpdateOptions struct {
	Name string `json:"name"`
}

Jump to

Keyboard shortcuts

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