wikijs

package
v0.0.0-...-c999451 Latest Latest
Warning

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

Go to latest
Published: Jun 1, 2022 License: MPL-2.0 Imports: 16 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ActiveAuthenticationStrategies

type ActiveAuthenticationStrategies struct {
	Data struct {
		Authentication struct {
			ActiveStrategies []struct {
				Key              string                 `json:"key"`
				Strategy         AuthenticationStrategy `json:"strategies"`
				DisplayName      string                 `json:"displayName"`
				Order            int                    `json:"order"`
				IsEnabled        bool                   `json:"isEnabled"`
				Config           []KeyValuePair         `json:"config"`
				SelfRegistration bool                   `json:"selfRegistration"`
				DomainWhitelist  []string               `json:"domainWhitelist"`
				AutoEnrollGroups []int                  `json:"autoEntrollGroups"`
				Typename         string                 `json:"__typename"`
			} `json:"activeStrategies"`
			Typename string `json:"__typename"`
		} `json:"authentication"`
	} `json:"data"`
}

type ApiCredentials

type ApiCredentials struct {
	Data struct {
		Authentication struct {
			CreateAPIKey struct {
				Key            string               `json:"key"`
				ResponseResult ResponseResultStruct `json:"responseResult"`
				Typename       string               `json:"__typename"`
			} `json:"createApiKey"`
			Typename string `json:"__typename"`
		} `json:"authentication"`
	} `json:"data"`
}

type ApiError

type ApiError struct {
	Code    int
	Message string
}

func (*ApiError) Error

func (e *ApiError) Error() string

type ApiKeyVariables

type ApiKeyVariables struct {
	Id int `json:"id"`
}

type ApiState

type ApiState struct {
	Data struct {
		Authentication struct {
			APIState bool `json:"apiState"`
		} `json:"authentication"`
	} `json:"data"`
}

type ApiVariables

type ApiVariables struct {
	Enabled bool `json:"enabled"`
}

type AuthenticationStrategies

type AuthenticationStrategies struct {
	Data struct {
		Authentication struct {
			Strategies []AuthenticationStrategy `json:"strategies"`
			Typename   string                   `json:"__typename"`
		} `json:"authentication"`
	} `json:"data"`
}

type AuthenticationStrategy

type AuthenticationStrategy struct {
	Key          string         `json:"key"`
	Props        []KeyValuePair `json:"props"`
	Title        string         `json:"title"`
	Description  string         `json:"description"`
	IsAvailable  bool           `json:"isAvailable"`
	UseForm      bool           `json:"useForm"`
	UsernameType string         `json:"usernameType"`
	Color        string         `json:"color"`
	Website      string         `json:"website"`
	Icon         string         `json:"icon"`
	Typename     string         `json:"__typename"`
}

type ClientCredentials

type ClientCredentials struct {
	AdminEmail string
	Password   string
	JwtToken   string
	ApiToken   string
	ApiKeyName string
}

type CreateApiKeyVariables

type CreateApiKeyVariables struct {
	Name       string `json:"name"`
	Expiration string `json:"expiration"`
	FullAccess bool   `json:"fullAccess"`
	Group      string `json:"group,omitempty"`
}

type Finalize

type Finalize struct {
	AdminEmail           string `json:"adminEmail"`
	AdminPassword        string `json:"adminPassword"`
	AdminPasswordConfirm string `json:"adminPasswordConfirm"`
	SiteUrl              string `json:"siteUrl"`
	Telemetry            bool   `json:"telemetry"`
}

type FinalizeResultStruct

type FinalizeResultStruct struct {
	Ok    bool   `json:"ok"`
	Error string `json:"error"`
}

type GetApiKeys

type GetApiKeys struct {
	Data struct {
		Authentication struct {
			APIKeys []struct {
				ID         int       `json:"id"`
				Name       string    `json:"name"`
				KeyShort   string    `json:"keyShort"`
				Expiration time.Time `json:"expiration"`
				IsRevoked  bool      `json:"isRevoked"`
				CreatedAt  time.Time `json:"createdAt"`
				UpdatedAt  time.Time `json:"updatedAt"`
				Typename   string    `json:"__typename"`
			} `json:"apiKeys"`
			Typename string `json:"__typename"`
		} `json:"authentication"`
	} `json:"data"`
}

type GraphQl

type GraphQl struct {
	OperationName interface{} `json:"operationName,omitempty"`
	Variables     interface{} `json:"variables,omitempty"`
	Extensions    struct {
	} `json:"extensions,omitempty"`
	Query string `json:"query"`
}

type KeyValuePair

type KeyValuePair struct {
	Key   string `json:"key"`
	Value string `json:"value"`
}

type LoginCredentials

type LoginCredentials struct {
	Data struct {
		Authentication struct {
			Login struct {
				ResponseResult    ResponseResultStruct `json:"responseResult"`
				Jwt               string               `json:"jwt"`
				MustChangePwd     interface{}          `json:"mustChangePwd"`
				MustProvideTFA    interface{}          `json:"mustProvideTFA"`
				MustSetupTFA      interface{}          `json:"mustSetupTFA"`
				ContinuationToken interface{}          `json:"continuationToken"`
				Redirect          string               `json:"redirect"`
				TfaQRImage        interface{}          `json:"tfaQRImage"`
				Typename          string               `json:"__typename"`
			} `json:"login"`
			Typename string `json:"__typename"`
		} `json:"authentication"`
	} `json:"data"`
	Errors []struct {
		Message string `json:"message"`
	} `json:"errors"`
}

type LoginVariables

type LoginVariables struct {
	Username string `json:"username"`
	Password string `json:"password"`
	Strategy string `json:"strategy"`
}

type ResponseResultStruct

type ResponseResultStruct struct {
	Succeeded bool   `json:"succeeded"`
	ErrorCode int    `json:"errorCode"`
	Slug      string `json:"slug"`
	Message   string `json:"message"`
	Typename  string `json:"__typename"`
}

type ResponseStatus

type ResponseStatus struct {
	Succeeded bool   `json:"succeeded"`
	ErrorCode int    `json:"errorCode"`
	Slug      string `json:"slug"`
	Message   string `json:"message"`
}

type WikijsClient

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

func NewWikijsClient

func NewWikijsClient(host, adminEmail, password string, initialSetup bool, clientTimeout int64, caCert string) (*WikijsClient, error)

func (*WikijsClient) Cleanup

func (wikijsClient *WikijsClient) Cleanup() error

func (*WikijsClient) GetActiveAuthenticationStrategies

func (wikijsClient *WikijsClient) GetActiveAuthenticationStrategies() (*ActiveAuthenticationStrategies, error)

func (*WikijsClient) GetAuthenticationStrategies

func (wikijsClient *WikijsClient) GetAuthenticationStrategies() (*AuthenticationStrategies, error)

func (*WikijsClient) RequiresSetup

func (wikijsClient *WikijsClient) RequiresSetup() (bool, error)

func (*WikijsClient) SetupDone

func (wikijsClient *WikijsClient) SetupDone() (bool, error)

Jump to

Keyboard shortcuts

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