models

package
v0.9.0 Latest Latest
Warning

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

Go to latest
Published: Oct 17, 2025 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Token

type Token struct {
	RoleName           string     `json:"role_name"`
	ConfigName         string     `json:"config_name"`
	GitlabRevokesToken bool       `json:"gitlab_revokes_token"`
	CreatedAt          *time.Time `json:"created_at"`
	ExpiresAt          *time.Time `json:"expires_at"`
	TokenType          token.Type `json:"type"`
	Token              string     `json:"token"`
	TokenID            int        `json:"token_id"`
	ParentID           string     `json:"parent_id"`
	Name               string     `json:"name"`
	Path               string     `json:"path"`
}

func (*Token) Data

func (t *Token) Data() map[string]any

func (*Token) Event

func (t *Token) Event(m map[string]string) (d map[string]string)

func (*Token) GetCreatedAt

func (t *Token) GetCreatedAt() (tm time.Time)

func (*Token) GetExpiresAt

func (t *Token) GetExpiresAt() (tm time.Time)

func (*Token) Internal

func (t *Token) Internal() map[string]any

func (*Token) SetConfigName

func (t *Token) SetConfigName(name string)

func (*Token) SetExpiresAt

func (t *Token) SetExpiresAt(expiresAt *time.Time)

func (*Token) SetGitlabRevokesToken

func (t *Token) SetGitlabRevokesToken(b bool)

func (*Token) SetRoleName

func (t *Token) SetRoleName(name string)

func (*Token) TTL

func (t *Token) TTL() time.Duration

func (*Token) Type

func (t *Token) Type() token.Type

type TokenConfig

type TokenConfig struct {
	TokenWithScopes `json:",inline"`

	UserID int `json:"user_id"`
}

func (*TokenConfig) Data

func (t *TokenConfig) Data() (d map[string]any)

func (*TokenConfig) Event

func (t *TokenConfig) Event(m map[string]string) (d map[string]string)

func (*TokenConfig) Internal

func (t *TokenConfig) Internal() (d map[string]any)

type TokenGroup

type TokenGroup struct {
	TokenWithScopesAndAccessLevel `json:",inline"`
}

type TokenGroupDeploy

type TokenGroupDeploy struct {
	TokenWithScopes `json:",inline"`

	Username string `json:"username"`
}

func (*TokenGroupDeploy) Data

func (t *TokenGroupDeploy) Data() (d map[string]any)

func (*TokenGroupDeploy) Event

func (t *TokenGroupDeploy) Event(m map[string]string) (d map[string]string)

func (*TokenGroupDeploy) Internal

func (t *TokenGroupDeploy) Internal() (d map[string]any)

type TokenGroupServiceAccount

type TokenGroupServiceAccount struct {
	TokenWithScopes `json:",inline"`

	UserID int `json:"user_id"`
}

func (*TokenGroupServiceAccount) Data

func (t *TokenGroupServiceAccount) Data() (d map[string]any)

func (*TokenGroupServiceAccount) Event

func (t *TokenGroupServiceAccount) Event(m map[string]string) (d map[string]string)

func (*TokenGroupServiceAccount) Internal

func (t *TokenGroupServiceAccount) Internal() (d map[string]any)

type TokenPersonal

type TokenPersonal struct {
	TokenWithScopes `json:",inline"`

	UserID int `json:"user_id"`
}

func (*TokenPersonal) Data

func (t *TokenPersonal) Data() (d map[string]any)

func (*TokenPersonal) Event

func (t *TokenPersonal) Event(m map[string]string) (d map[string]string)

func (*TokenPersonal) Internal

func (t *TokenPersonal) Internal() (d map[string]any)

type TokenPipelineProjectTrigger

type TokenPipelineProjectTrigger struct {
	Token `json:",inline"`
}

type TokenProject

type TokenProject struct {
	TokenWithScopesAndAccessLevel `json:",inline"`
}

type TokenProjectDeploy

type TokenProjectDeploy struct {
	TokenWithScopes `json:",inline"`

	Username string `json:"username"`
}

func (*TokenProjectDeploy) Data

func (t *TokenProjectDeploy) Data() (d map[string]any)

func (*TokenProjectDeploy) Event

func (t *TokenProjectDeploy) Event(m map[string]string) (d map[string]string)

func (*TokenProjectDeploy) Internal

func (t *TokenProjectDeploy) Internal() (d map[string]any)

type TokenUserServiceAccount

type TokenUserServiceAccount struct {
	TokenWithScopes `json:",inline"`
}

type TokenWithScopes

type TokenWithScopes struct {
	Token `json:",inline"`

	Scopes []string `json:"scopes"`
}

func (*TokenWithScopes) Data

func (t *TokenWithScopes) Data() (d map[string]any)

func (*TokenWithScopes) Event

func (t *TokenWithScopes) Event(m map[string]string) (d map[string]string)

func (*TokenWithScopes) Internal

func (t *TokenWithScopes) Internal() (d map[string]any)

type TokenWithScopesAndAccessLevel

type TokenWithScopesAndAccessLevel struct {
	Token `json:",inline"`

	Scopes      []string          `json:"scopes"`
	AccessLevel token.AccessLevel `json:"access_level"`
}

func (*TokenWithScopesAndAccessLevel) Data

func (t *TokenWithScopesAndAccessLevel) Data() (d map[string]any)

func (*TokenWithScopesAndAccessLevel) Event

func (t *TokenWithScopesAndAccessLevel) Event(m map[string]string) (d map[string]string)

func (*TokenWithScopesAndAccessLevel) Internal

func (t *TokenWithScopesAndAccessLevel) Internal() (d map[string]any)

Jump to

Keyboard shortcuts

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