models

package
v0.5.1 Latest Latest
Warning

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

Go to latest
Published: Jul 8, 2026 License: Apache-2.0 Imports: 13 Imported by: 4

Documentation

Index

Constants

This section is empty.

Variables

View Source
var AllOrdering = []Ordering{
	OrderingAsc,
	OrderingDesc,
}

Functions

func DeletedAt

func DeletedAt(t gorm.DeletedAt) *time.Time

DeletedAt returns a pointer to the time.Time value if the gorm.DeletedAt is valid, otherwise it returns nil.

Types

type ActiveStatus

type ActiveStatus string

The list of statuses that shows is particular object active or paused

const (
	// All object by default have to be paused
	ActiveStatusPaused ActiveStatus = "PAUSED"
	// Status of the active object
	ActiveStatusActive ActiveStatus = "ACTIVE"
)

func (ActiveStatus) IsValid

func (e ActiveStatus) IsValid() bool

func (ActiveStatus) MarshalGQL

func (e ActiveStatus) MarshalGQL(w io.Writer)

func (ActiveStatus) MarshalJSON added in v0.2.4

func (e ActiveStatus) MarshalJSON() ([]byte, error)

func (ActiveStatus) String

func (e ActiveStatus) String() string

func (*ActiveStatus) UnmarshalGQL

func (e *ActiveStatus) UnmarshalGQL(v any) error

func (*ActiveStatus) UnmarshalJSON added in v0.2.4

func (e *ActiveStatus) UnmarshalJSON(b []byte) error

type ApproveStatus

type ApproveStatus string

The list of statuses that shows is object approved or not

const (
	// Pending status of the just inited objects
	ApproveStatusPending ApproveStatus = "PENDING"
	// Approved status of object could be obtained from the some authorized user who have permissions
	ApproveStatusApproved ApproveStatus = "APPROVED"
	// Rejected status of object could be obtained from the some authorized user who have permissions
	ApproveStatusRejected ApproveStatus = "REJECTED"
)

func ApproveStatusFrom

func ApproveStatusFrom(status pkgModels.ApproveStatus) ApproveStatus

ApproveStatusFrom model value

func (ApproveStatus) IsValid

func (e ApproveStatus) IsValid() bool

func (ApproveStatus) MarshalGQL

func (e ApproveStatus) MarshalGQL(w io.Writer)

func (ApproveStatus) MarshalJSON added in v0.2.4

func (e ApproveStatus) MarshalJSON() ([]byte, error)

func (*ApproveStatus) ModelStatus

func (status *ApproveStatus) ModelStatus() pkgModels.ApproveStatus

ModelStatus returns status type from models

func (ApproveStatus) String

func (e ApproveStatus) String() string

func (*ApproveStatus) UnmarshalGQL

func (e *ApproveStatus) UnmarshalGQL(v any) error

func (*ApproveStatus) UnmarshalJSON added in v0.2.4

func (e *ApproveStatus) UnmarshalJSON(b []byte) error

type AuthClient

type AuthClient struct {
	// ClientID is the client ID which represents unique connection indentificator
	ID        string `json:"ID"`
	AccountID uint64 `json:"accountID"`
	UserID    uint64 `json:"userID"`
	// Title of the AuthClient as himan readable name
	Title string `json:"title"`
	// Secret is the client's secret. The secret will be included in the create request as cleartext, and then
	// never again. The secret is stored using BCrypt so it is impossible to recover it. Tell your users
	// that they need to write the secret down as it will not be made available again.
	Secret string `json:"secret"`
	// RedirectURIs is an array of allowed redirect urls for the client, for example http://mydomain/oauth/callback .
	RedirectURIs []string `json:"redirectURIs,omitempty"`
	// GrantTypes is an array of grant types the client is allowed to use.
	//
	// Pattern: client_credentials|authorization_code|implicit|refresh_token
	GrantTypes []string `json:"grantTypes,omitempty"`
	// ResponseTypes is an array of the OAuth 2.0 response type strings that the client can
	// use at the authorization endpoint.
	//
	// Pattern: id_token|code|token
	ResponseTypes []string `json:"responseTypes,omitempty"`
	// Scope is a string containing a space-separated list of scope values (as
	// described in Section 3.3 of OAuth 2.0 [RFC6749]) that the client
	// can use when requesting access tokens.
	//
	// Pattern: ([a-zA-Z0-9\.\*]+\s?)+
	Scope string `json:"scope"`
	// Audience is a whitelist defining the audiences this client is allowed to request tokens for. An audience limits
	// the applicability of an OAuth 2.0 Access Token to, for example, certain API endpoints. The value is a list
	// of URLs. URLs MUST NOT contain whitespaces.
	Audience []string `json:"audience,omitempty"`
	// SubjectType requested for responses to this Client. The subject_types_supported Discovery parameter contains a
	// list of the supported subject_type values for this server. Valid types include `pairwise` and `public`.
	SubjectType string `json:"subjectType"`
	// AllowedCORSOrigins are one or more URLs (scheme://host[:port]) which are allowed to make CORS requests
	// to the /oauth/token endpoint. If this array is empty, the sever's CORS origin configuration (`CORS_ALLOWED_ORIGINS`)
	// will be used instead. If this array is set, the allowed origins are appended to the server's CORS origin configuration.
	// Be aware that environment variable `CORS_ENABLED` MUST be set to `true` for this to work.
	AllowedCORSOrigins []string `json:"allowedCORSOrigins,omitempty"`
	// Public flag tells that the client is public
	Public bool `json:"public"`
	// ExpiresAt contins the time of expiration of the client
	ExpiresAt time.Time  `json:"expiresAt"`
	CreatedAt time.Time  `json:"createdAt"`
	UpdatedAt time.Time  `json:"updatedAt"`
	DeletedAt *time.Time `json:"deletedAt,omitempty"`
}

AuthClient object represents an OAuth 2.0 client

type AuthClientCreateInput added in v0.4.0

type AuthClientCreateInput struct {
	// AccountID of the auth client owner
	AccountID *uint64 `json:"accountID,omitempty"`
	// UserID of the auth client creator
	UserID *uint64 `json:"userID,omitempty"`
	// Title of the auth client as human readable name
	Title *string `json:"title,omitempty"`
	// Secret for the OAuth 2.0 client
	Secret *string `json:"secret,omitempty"`
	// RedirectURIs allowed for this client
	RedirectURIs []string `json:"redirectURIs,omitempty"`
	// GrantTypes allowed for this client
	GrantTypes []string `json:"grantTypes,omitempty"`
	// ResponseTypes allowed for this client
	ResponseTypes []string `json:"responseTypes,omitempty"`
	// Scope string for the client
	Scope *string `json:"scope,omitempty"`
	// Audience whitelist for token requests
	Audience []string `json:"audience,omitempty"`
	// SubjectType for responses to this client
	SubjectType string `json:"subjectType"`
	// AllowedCORSOrigins for this client
	AllowedCORSOrigins []string `json:"allowedCORSOrigins,omitempty"`
	// Public flag for the client
	Public *bool `json:"public,omitempty"`
	// ExpiresAt time for the client
	ExpiresAt *time.Time `json:"expiresAt,omitempty"`
}

AuthClientCreateInput is used to create a new OAuth 2.0 client

type AuthClientEdge

type AuthClientEdge struct {
	// A cursor for use in pagination.
	Cursor string `json:"cursor"`
	// The item at the end of the edge.
	Node *AuthClient `json:"node,omitempty"`
}

type AuthClientListFilter

type AuthClientListFilter struct {
	ID        []string `json:"ID,omitempty"`
	UserID    []uint64 `json:"userID,omitempty"`
	AccountID []uint64 `json:"accountID,omitempty"`
	Public    *bool    `json:"public,omitempty"`
}

type AuthClientListOrder

type AuthClientListOrder struct {
	ID         *Ordering `json:"ID,omitempty"`
	UserID     *Ordering `json:"userID,omitempty"`
	AccountID  *Ordering `json:"accountID,omitempty"`
	Title      *Ordering `json:"title,omitempty"`
	Public     *Ordering `json:"public,omitempty"`
	LastUpdate *Ordering `json:"lastUpdate,omitempty"`
}

type AuthClientPayload

type AuthClientPayload struct {
	// A unique identifier for the client performing the mutation.
	ClientMutationID string `json:"clientMutationID"`
	// AuthClient ID operation result
	AuthClientID string `json:"authClientID"`
	// AuthClient object accessor
	AuthClient *AuthClient `json:"authClient,omitempty"`
}

AuthClientPayload wrapper to access of AuthClient oprtation results

type AuthClientUpdateInput added in v0.4.0

type AuthClientUpdateInput struct {
	// AccountID of the auth client owner
	AccountID *uint64 `json:"accountID,omitempty"`
	// UserID of the auth client creator
	UserID *uint64 `json:"userID,omitempty"`
	// Title of the auth client as human readable name
	Title *string `json:"title,omitempty"`
	// Secret for the OAuth 2.0 client
	Secret *string `json:"secret,omitempty"`
	// RedirectURIs allowed for this client
	RedirectURIs []string `json:"redirectURIs,omitempty"`
	// GrantTypes allowed for this client
	GrantTypes []string `json:"grantTypes,omitempty"`
	// ResponseTypes allowed for this client
	ResponseTypes []string `json:"responseTypes,omitempty"`
	// Scope string for the client
	Scope *string `json:"scope,omitempty"`
	// Audience whitelist for token requests
	Audience []string `json:"audience,omitempty"`
	// SubjectType for responses to this client
	SubjectType *string `json:"subjectType,omitempty"`
	// AllowedCORSOrigins for this client
	AllowedCORSOrigins []string `json:"allowedCORSOrigins,omitempty"`
	// Public flag for the client
	Public *bool `json:"public,omitempty"`
	// ExpiresAt time for the client
	ExpiresAt *time.Time `json:"expiresAt,omitempty"`
}

AuthClientUpdateInput is used to update an existing OAuth 2.0 client

type AvailableStatus

type AvailableStatus string

The list of statuses that shows is particular object is available

const (
	// All object by default have to be undefined
	AvailableStatusUndefined AvailableStatus = "UNDEFINED"
	// Status of the available object
	AvailableStatusAvailable AvailableStatus = "AVAILABLE"
	// Status of the unavailable object
	AvailableStatusUnavailable AvailableStatus = "UNAVAILABLE"
)

func AvailableStatusFrom

func AvailableStatusFrom(status pkgModels.AvailableStatus) AvailableStatus

AvailableStatusFrom model value

func (AvailableStatus) IsValid

func (e AvailableStatus) IsValid() bool

func (AvailableStatus) MarshalGQL

func (e AvailableStatus) MarshalGQL(w io.Writer)

func (AvailableStatus) MarshalJSON added in v0.2.4

func (e AvailableStatus) MarshalJSON() ([]byte, error)

func (*AvailableStatus) ModelStatus

func (status *AvailableStatus) ModelStatus() pkgModels.AvailableStatus

ModelStatus returns status type from models

func (AvailableStatus) String

func (e AvailableStatus) String() string

func (*AvailableStatus) UnmarshalGQL

func (e *AvailableStatus) UnmarshalGQL(v any) error

func (*AvailableStatus) UnmarshalJSON added in v0.2.4

func (e *AvailableStatus) UnmarshalJSON(b []byte) error

type DirectAccessToken

type DirectAccessToken struct {
	ID          uint64    `json:"ID"`
	Token       string    `json:"token"`
	Description string    `json:"description"`
	UserID      *uint64   `json:"userID,omitempty"`
	AccountID   uint64    `json:"accountID"`
	CreatedAt   time.Time `json:"createdAt"`
	ExpiresAt   time.Time `json:"expiresAt"`
}

type DirectAccessTokenEdge

type DirectAccessTokenEdge struct {
	// Cursor for pagination
	Cursor string `json:"cursor"`
	// Node for the edge
	Node *DirectAccessToken `json:"node,omitempty"`
}

type DirectAccessTokenListFilter

type DirectAccessTokenListFilter struct {
	ID           []uint64   `json:"ID,omitempty"`
	Token        []string   `json:"token,omitempty"`
	UserID       []uint64   `json:"userID,omitempty"`
	AccountID    []uint64   `json:"accountID,omitempty"`
	MinExpiresAt *time.Time `json:"minExpiresAt,omitempty"`
	MaxExpiresAt *time.Time `json:"maxExpiresAt,omitempty"`
}

type DirectAccessTokenListOrder

type DirectAccessTokenListOrder struct {
	ID        *Ordering `json:"ID,omitempty"`
	Token     *Ordering `json:"token,omitempty"`
	UserID    *Ordering `json:"userID,omitempty"`
	AccountID *Ordering `json:"accountID,omitempty"`
	CreatedAt *Ordering `json:"createdAt,omitempty"`
	ExpiresAt *Ordering `json:"expiresAt,omitempty"`
}

type DirectAccessTokenPayload

type DirectAccessTokenPayload struct {
	// Unique identifier for the client performing the mutation
	ClientMutationID string `json:"clientMutationID"`
	// DirectAccessToken ID operation result
	Token *DirectAccessToken `json:"token,omitempty"`
}

type HistoryAction

type HistoryAction struct {
	ID         uuid.UUID          `json:"ID"`
	RequestID  string             `json:"RequestID"`
	Name       string             `json:"name"`
	Message    string             `json:"message"`
	UserID     uint64             `json:"userID"`
	AccountID  uint64             `json:"accountID"`
	ObjectType string             `json:"objectType"`
	ObjectID   uint64             `json:"objectID"`
	ObjectIDs  string             `json:"objectIDs"`
	Data       types.NullableJSON `json:"data"`
	ActionAt   time.Time          `json:"actionAt"`
}

HistoryAction is the model for history actions.

type HistoryActionEdge

type HistoryActionEdge struct {
	// The item at the end of the edge.
	Node *HistoryAction `json:"node"`
	// A cursor for use in pagination.
	Cursor string `json:"cursor"`
}

Edge of action history object.

type HistoryActionListFilter

type HistoryActionListFilter struct {
	ID []uuid.UUID `json:"ID,omitempty"`
	// The request ID of the action
	RequestID []string `json:"RequestID,omitempty"`
	// The name of the action
	Name []string `json:"name,omitempty"`
	// List of users who made the action
	UserID []uint64 `json:"userID,omitempty"`
	// List of accounts that the user belongs to
	AccountID []uint64 `json:"accountID,omitempty"`
	// Type of the object that the action is performed on
	ObjectType []string `json:"objectType,omitempty"`
	// Object ID of the model that the action is performed on
	ObjectID []uint64 `json:"objectID,omitempty"`
	// Object ID string version of the model that the action is performed on
	ObjectIDs []string `json:"objectIDs,omitempty"`
}

type HistoryActionListOrder

type HistoryActionListOrder struct {
	ID         *Ordering `json:"ID,omitempty"`
	RequestID  *Ordering `json:"RequestID,omitempty"`
	Name       *Ordering `json:"name,omitempty"`
	UserID     *Ordering `json:"userID,omitempty"`
	AccountID  *Ordering `json:"accountID,omitempty"`
	ObjectType *Ordering `json:"objectType,omitempty"`
	ObjectID   *Ordering `json:"objectID,omitempty"`
	ObjectIDs  *Ordering `json:"objectIDs,omitempty"`
	ActionAt   *Ordering `json:"actionAt,omitempty"`
}

HistoryActionListOptions contains the options for listing history actions ordering.

type HistoryActionPayload

type HistoryActionPayload struct {
	// The client mutation id
	ClientMutationID *string `json:"clientMutationId,omitempty"`
	// The history action object ID
	ActionID uuid.UUID `json:"actionID"`
	// The action object
	Action *HistoryAction `json:"action"`
}

HistoryActionPayload contains the information about a history action.

type InviteMemberInput

type InviteMemberInput struct {
	// The ID of the member to invite
	UserID uint64 `json:"userID"`
	// The roles to assign to the member
	Roles []string `json:"roles"`
	// Is the user an admin of the account
	IsAdmin bool `json:"isAdmin"`
}

type Member

type Member struct {
	// The primary key of the Member
	ID uint64 `json:"ID"`
	// Status of Member active
	Status ApproveStatus `json:"status"`
	// User ID of the member
	UserID uint64 `json:"userID"`
	// Account ID of the member
	AccountID uint64 `json:"accountID"`
	// Is the user an admin of the account
	IsAdmin bool `json:"isAdmin"`
	// Roles of the member
	Roles     []*RBACRole `json:"roles,omitempty"`
	CreatedAt time.Time   `json:"createdAt"`
	UpdatedAt time.Time   `json:"updatedAt"`
	DeletedAt *time.Time  `json:"deletedAt,omitempty"`
}

Account Member represents a member of the account

type MemberEdge

type MemberEdge struct {
	// A cursor for use in pagination.
	Cursor string `json:"cursor"`
	// The item at the end of the edge.
	Node *Member `json:"node,omitempty"`
}

type MemberInput

type MemberInput struct {
	// The roles to assign to the member
	Roles []string `json:"roles"`
	// Is the user an admin of the account
	IsAdmin bool `json:"isAdmin"`
}

type MemberListFilter

type MemberListFilter struct {
	ID        []uint64        `json:"ID,omitempty"`
	Status    []ApproveStatus `json:"status,omitempty"`
	UserID    []uint64        `json:"userID,omitempty"`
	AccountID []uint64        `json:"accountID,omitempty"`
	IsAdmin   *bool           `json:"isAdmin,omitempty"`
}

type MemberListOrder

type MemberListOrder struct {
	ID        *Ordering `json:"ID,omitempty"`
	Status    *Ordering `json:"status,omitempty"`
	UserID    *Ordering `json:"userID,omitempty"`
	AccountID *Ordering `json:"accountID,omitempty"`
	IsAdmin   *Ordering `json:"isAdmin,omitempty"`
	CreatedAt *Ordering `json:"createdAt,omitempty"`
	UpdatedAt *Ordering `json:"updatedAt,omitempty"`
}

type MemberPayload

type MemberPayload struct {
	// A unique identifier for the client performing the mutation.
	ClientMutationID string `json:"clientMutationID"`
	// Member ID operation result
	MemberID uint64 `json:"memberID"`
	// Member object accessor
	Member *Member `json:"member,omitempty"`
}

type Mutation

type Mutation struct {
}

type Option

type Option struct {
	Type     OptionType          `json:"type"`
	TargetID uint64              `json:"targetID"`
	Name     string              `json:"name"`
	Value    *types.NullableJSON `json:"value,omitempty"`
}

Option type definition represents a single option of the user or the system.

func FromOption

func FromOption(opt *option.Option) *Option

func FromOptionModelList

func FromOptionModelList(opts []*option.Option) []*Option

type OptionEdge

type OptionEdge struct {
	Cursor string  `json:"cursor"`
	Node   *Option `json:"node"`
}

The edge type for Option.

type OptionListFilter

type OptionListFilter struct {
	Type        []OptionType `json:"type,omitempty"`
	TargetID    []uint64     `json:"targetID,omitempty"`
	Name        []string     `json:"name,omitempty"`
	NamePattern []string     `json:"namePattern,omitempty"`
}

func (*OptionListFilter) Filter

func (fl *OptionListFilter) Filter() *option.Filter

type OptionListOrder

type OptionListOrder struct {
	Type     *Ordering `json:"type,omitempty"`
	TargetID *Ordering `json:"targetID,omitempty"`
	Name     *Ordering `json:"name,omitempty"`
	Value    *Ordering `json:"value,omitempty"`
}

func (*OptionListOrder) Order

func (ol *OptionListOrder) Order() *option.ListOrder

type OptionPayload

type OptionPayload struct {
	// A unique identifier for the client performing the mutation.
	ClientMutationID string `json:"clientMutationId"`
	// Option name
	Name string `json:"name"`
	// Option value
	Option *Option `json:"option,omitempty"`
}

type OptionType

type OptionType string
const (
	OptionTypeUndefined OptionType = "UNDEFINED"
	OptionTypeUser      OptionType = "USER"
	OptionTypeAccount   OptionType = "ACCOUNT"
	OptionTypeSystem    OptionType = "SYSTEM"
)

func FromOptionType

func FromOptionType(tp option.OptionType) OptionType

func (OptionType) IsValid

func (e OptionType) IsValid() bool

func (OptionType) MarshalGQL

func (e OptionType) MarshalGQL(w io.Writer)

func (OptionType) MarshalJSON added in v0.2.4

func (e OptionType) MarshalJSON() ([]byte, error)

func (OptionType) ModelType

func (tp OptionType) ModelType() option.OptionType

func (OptionType) String

func (e OptionType) String() string

func (*OptionType) UnmarshalGQL

func (e *OptionType) UnmarshalGQL(v any) error

func (*OptionType) UnmarshalJSON added in v0.2.4

func (e *OptionType) UnmarshalJSON(b []byte) error

type Ordering

type Ordering string

Constants of the order of data

const (
	// Ascending ordering of data
	OrderingAsc Ordering = "ASC"
	// Descending ordering of data
	OrderingDesc Ordering = "DESC"
)

func (*Ordering) AsOrder

func (order *Ordering) AsOrder() models.Order

func (*Ordering) Int8

func (order *Ordering) Int8() int8

func (Ordering) IsValid

func (e Ordering) IsValid() bool

func (Ordering) MarshalGQL

func (e Ordering) MarshalGQL(w io.Writer)

func (Ordering) MarshalJSON added in v0.2.4

func (e Ordering) MarshalJSON() ([]byte, error)

func (Ordering) String

func (e Ordering) String() string

func (*Ordering) UnmarshalGQL

func (e *Ordering) UnmarshalGQL(v any) error

func (*Ordering) UnmarshalJSON added in v0.2.4

func (e *Ordering) UnmarshalJSON(b []byte) error

type Page

type Page struct {
	// Start after the cursor ID
	After *string `json:"after,omitempty"`
	// Start after some records
	Offset *int `json:"offset,omitempty"`
	// Page number to start at (0-based), defaults to 0 (0, 1, 2, etc.)
	StartPage *int `json:"startPage,omitempty"`
	// Maximum number of items to return
	Size *int `json:"size,omitempty"`
}

Information for paginating

func (*Page) Pagination

func (p *Page) Pagination() *repository.Pagination

type PageInfo

type PageInfo struct {
	// When paginating backwards, the cursor to continue.
	StartCursor string `json:"startCursor"`
	// When paginating forwards, the cursor to continue.
	EndCursor string `json:"endCursor"`
	// When paginating backwards, are there more items?
	HasPreviousPage bool `json:"hasPreviousPage"`
	// When paginating forwards, are there more items?
	HasNextPage bool `json:"hasNextPage"`
	// Total number of pages available
	Total int `json:"total"`
	// Current page number
	Page int `json:"page"`
	// Number of pages
	Count int `json:"count"`
}

Information for paginating

type Query

type Query struct {
}

type RBACPermission

type RBACPermission struct {
	Name        string  `json:"name"`
	Object      string  `json:"object"`
	Access      string  `json:"access"`
	Fullname    string  `json:"fullname"`
	Description *string `json:"description,omitempty"`
}

type RBACRole

type RBACRole struct {
	ID          uint64  `json:"ID"`
	Name        string  `json:"name"`
	Title       string  `json:"title"`
	Description *string `json:"description,omitempty"`
	//  Context is a JSON object that defines the context of the role.
	//  The context is used to determine whether the role is applicable to the object.
	//  The context is a JSON object with the following structure:
	//
	// {"cover": "system", "object": "role"}
	//
	//  where:
	// "cover" - is a name of the cover area of the object type
	// "object" - is a name of the object type <module>:<object-name>
	Context            *types.NullableJSON `json:"context,omitempty"`
	ChildRoles         []*RBACRole         `json:"childRoles,omitempty"`
	Permissions        []*RBACPermission   `json:"permissions,omitempty"`
	PermissionPatterns []string            `json:"permissionPatterns,omitempty"`
	CreatedAt          time.Time           `json:"createdAt"`
	UpdatedAt          time.Time           `json:"updatedAt"`
	DeletedAt          *time.Time          `json:"deletedAt,omitempty"`
}

A role is a collection of permissions. A role can be a child of another role.

type RBACRoleEdge

type RBACRoleEdge struct {
	// A cursor for use in pagination.
	Cursor string `json:"cursor"`
	// The item at the end of the edge.
	Node *RBACRole `json:"node,omitempty"`
}

RBACRoleEdge is a connection edge type for RBACRole.

type RBACRoleInput

type RBACRoleInput struct {
	Name        *string             `json:"name,omitempty"`
	Title       *string             `json:"title,omitempty"`
	Context     *types.NullableJSON `json:"context,omitempty"`
	Permissions []string            `json:"permissions,omitempty"`
}

type RBACRoleListFilter

type RBACRoleListFilter struct {
	ID   []uint64 `json:"ID,omitempty"`
	Name []string `json:"name,omitempty"`
}

type RBACRoleListOrder

type RBACRoleListOrder struct {
	ID    *Ordering `json:"ID,omitempty"`
	Name  *Ordering `json:"name,omitempty"`
	Title *Ordering `json:"title,omitempty"`
}

type RBACRolePayload

type RBACRolePayload struct {
	// A unique identifier for the client performing the mutation.
	ClientMutationID string `json:"clientMutationID"`
	// Role ID operation result
	RoleID uint64 `json:"roleID"`
	// Role object accessor
	Role *RBACRole `json:"role,omitempty"`
}

RBACRolePayload wrapper to access of RBACRole oprtation results

type ResponseStatus

type ResponseStatus string

Constants of the response status

const (
	// Success status of the response
	ResponseStatusSuccess ResponseStatus = "SUCCESS"
	// Error status of the response
	ResponseStatusError ResponseStatus = "ERROR"
)

func (ResponseStatus) IsValid

func (e ResponseStatus) IsValid() bool

func (ResponseStatus) MarshalGQL

func (e ResponseStatus) MarshalGQL(w io.Writer)

func (ResponseStatus) MarshalJSON added in v0.2.4

func (e ResponseStatus) MarshalJSON() ([]byte, error)

func (ResponseStatus) String

func (e ResponseStatus) String() string

func (*ResponseStatus) UnmarshalGQL

func (e *ResponseStatus) UnmarshalGQL(v any) error

func (*ResponseStatus) UnmarshalJSON added in v0.2.4

func (e *ResponseStatus) UnmarshalJSON(b []byte) error

type SessionToken

type SessionToken struct {
	Token     string    `json:"token"`
	ExpiresAt time.Time `json:"expiresAt"`
	IsAdmin   bool      `json:"isAdmin"`
	Roles     []string  `json:"roles,omitempty"`
}

SessionToken object represents an OAuth 2.0 / JWT session token

type SocialAccount

type SocialAccount struct {
	ID        uint64             `json:"ID"`
	UserID    uint64             `json:"userID"`
	SocialID  string             `json:"socialID"`
	Provider  string             `json:"provider"`
	Email     string             `json:"email"`
	Username  string             `json:"username"`
	FirstName string             `json:"firstName"`
	LastName  string             `json:"lastName"`
	Avatar    string             `json:"avatar"`
	Link      string             `json:"link"`
	Data      types.NullableJSON `json:"data"`
	// Social Account session object accessor
	Sessions  []*SocialAccountSession `json:"sessions,omitempty"`
	CreatedAt time.Time               `json:"createdAt"`
	UpdatedAt time.Time               `json:"updatedAt"`
	DeletedAt *time.Time              `json:"deletedAt,omitempty"`
}

type SocialAccountEdge

type SocialAccountEdge struct {
	// A cursor for use in pagination.
	Cursor string `json:"cursor"`
	// The item at the end of the edge.
	Node *SocialAccount `json:"node,omitempty"`
}

type SocialAccountListFilter

type SocialAccountListFilter struct {
	ID       []uint64 `json:"ID,omitempty"`
	UserID   []uint64 `json:"userID,omitempty"`
	Provider []string `json:"provider,omitempty"`
	Username []string `json:"username,omitempty"`
	Email    []string `json:"email,omitempty"`
}

type SocialAccountListOrder

type SocialAccountListOrder struct {
	ID        *Ordering `json:"ID,omitempty"`
	UserID    *Ordering `json:"userID,omitempty"`
	Provider  *Ordering `json:"provider,omitempty"`
	Email     *Ordering `json:"email,omitempty"`
	Username  *Ordering `json:"username,omitempty"`
	FirstName *Ordering `json:"firstName,omitempty"`
	LastName  *Ordering `json:"lastName,omitempty"`
}

type SocialAccountPayload

type SocialAccountPayload struct {
	// A unique identifier for the client performing the mutation.
	ClientMutationID string `json:"clientMutationID"`
	// Social Account ID operation result
	SocialAccountID uint64 `json:"socialAccountID"`
	// Social Account object accessor
	SocialAccount *SocialAccount `json:"socialAccount,omitempty"`
}

SocialAccountPayload wrapper to access of SocialAccount oprtation results

type SocialAccountSession

type SocialAccountSession struct {
	// The unique name of the session to destinguish between different sessions with different scopes
	Name            string     `json:"name"`
	SocialAccountID uint64     `json:"socialAccountID"`
	TokenType       string     `json:"tokenType"`
	AccessToken     string     `json:"accessToken"`
	RefreshToken    string     `json:"refreshToken"`
	Scope           []string   `json:"scope,omitempty"`
	CreatedAt       time.Time  `json:"createdAt"`
	UpdatedAt       time.Time  `json:"updatedAt"`
	ExpiresAt       *time.Time `json:"expiresAt,omitempty"`
	DeletedAt       *time.Time `json:"deletedAt,omitempty"`
}

type StatusResponse

type StatusResponse struct {
	// Unique identifier for the client performing the mutation
	ClientMutationID string `json:"clientMutationID"`
	// The status of the response
	Status ResponseStatus `json:"status"`
	// The message of the response
	Message *string `json:"message,omitempty"`
}

Simple response type for the API

Jump to

Keyboard shortcuts

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