Documentation ¶
Index ¶
- type SomaError
- type SomaUtil
- func (u *SomaUtil) Abort(txt ...string)
- func (u *SomaUtil) AbortOnError(err error, txt ...string)
- func (u SomaUtil) BucketByUUIDOrName(c *resty.Client, b string) string
- func (u SomaUtil) BucketIdByName(c *resty.Client, bucket string) string
- func (u *SomaUtil) CheckRestyResponse(resp *resty.Response)
- func (u *SomaUtil) CheckServerKeyword(s string)
- func (u SomaUtil) CheckStringIsServiceAttribute(c *resty.Client, s string)
- func (u SomaUtil) CheckStringIsSystemProperty(c *resty.Client, s string)
- func (u *SomaUtil) CheckStringNotAKeyword(s string, keys []string)
- func (u SomaUtil) CleanConstraints(c *resty.Client, constraints []proto.CheckConfigConstraint, repoId string, ...) []proto.CheckConfigConstraint
- func (u SomaUtil) CleanThresholds(c *resty.Client, thresholds []proto.CheckConfigThreshold) []proto.CheckConfigThreshold
- func (u *SomaUtil) DecodeCheckConfigurationResultFromResponse(resp *resty.Response) *proto.Result
- func (u SomaUtil) DecodeProtoResultAttributeFromResponse(resp *resty.Response) *proto.Result
- func (u SomaUtil) DecodeProtoResultBucketFromResponse(resp *resty.Response) *proto.Result
- func (u *SomaUtil) DecodeProtoResultCapabilityFromResponse(resp *resty.Response) *proto.Result
- func (u SomaUtil) DecodeProtoResultClusterFromResponse(resp *resty.Response) *proto.Result
- func (u SomaUtil) DecodeProtoResultGroupFromResponse(resp *resty.Response) *proto.Result
- func (u *SomaUtil) DecodeProtoResultLevelFromResponse(resp *resty.Response) *proto.Result
- func (u *SomaUtil) DecodeProtoResultMonitoringFromResponse(resp *resty.Response) *proto.Result
- func (u SomaUtil) DecodeProtoResultNodeFromResponse(resp *resty.Response) *proto.Result
- func (u SomaUtil) DecodeProtoResultOncallFromResponse(resp *resty.Response) *proto.Result
- func (u SomaUtil) DecodeProtoResultPropertyFromResponse(resp *resty.Response) *proto.Result
- func (u SomaUtil) DecodeProtoResultRepositoryFromResponse(resp *resty.Response) *proto.Result
- func (u SomaUtil) DecodeProtoResultServerFromResponse(resp *resty.Response) *proto.Result
- func (u SomaUtil) DecodeProtoResultTeamFromResponse(resp *resty.Response) *proto.Result
- func (u SomaUtil) DecodeResultFromResponse(resp *resty.Response) *proto.Result
- func (u SomaUtil) DeleteRequest(c *resty.Client, p string) *resty.Response
- func (u SomaUtil) DeleteRequestWithBody(c *resty.Client, body interface{}, p string) *resty.Response
- func (u SomaUtil) FindSourceForBucketProperty(c *resty.Client, pTyp, pName, view, bucketId string) string
- func (u SomaUtil) FindSourceForClusterProperty(c *resty.Client, pTyp, pName, view, clusterId string) string
- func (u SomaUtil) FindSourceForGroupProperty(c *resty.Client, pTyp, pName, view, groupId string) string
- func (u SomaUtil) FindSourceForNodeProperty(c *resty.Client, pTyp, pName, view, nodeId string) string
- func (u SomaUtil) FindSourceForRepoProperty(c *resty.Client, pTyp, pName, view, repoId string) string
- func (u SomaUtil) GetBucketDetails(c *resty.Client, bucketId string) *proto.Bucket
- func (u SomaUtil) GetBucketIdByName(c *resty.Client, bucket string, repoId string) string
- func (u *SomaUtil) GetCapabilityIdByName(c *resty.Client, capability string) string
- func (u *SomaUtil) GetCheckByName(c *resty.Client, ck string, r string) string
- func (u *SomaUtil) GetCliArgumentCount(c *cli.Context) int
- func (u SomaUtil) GetClusterDetails(c *resty.Client, clusterId string) *proto.Cluster
- func (u SomaUtil) GetClusterIdByName(c *resty.Client, cl string, bId string) string
- func (u *SomaUtil) GetFullArgumentSlice(c *cli.Context) []string
- func (u SomaUtil) GetGroupDetails(c *resty.Client, groupId string) *proto.Group
- func (u SomaUtil) GetGroupIdByName(c *resty.Client, g string, bId string) string
- func (u *SomaUtil) GetMonitoringIdByName(c *resty.Client, monitoring string) string
- func (u *SomaUtil) GetNewPassword() string
- func (u SomaUtil) GetNodeConfigById(c *resty.Client, node string) *proto.NodeConfig
- func (u SomaUtil) GetNodeDetails(c *resty.Client, nodeId string) *proto.Node
- func (u SomaUtil) GetNodeIdByName(c *resty.Client, node string) string
- func (u SomaUtil) GetObjectIdForCheck(c *resty.Client, t string, n string, b string) string
- func (u SomaUtil) GetOncallDetailsById(c *resty.Client, oncallid string) (string, string)
- func (u SomaUtil) GetOncallIdByName(c *resty.Client, oncall string) string
- func (u *SomaUtil) GetPermissionIdByName(c *resty.Client, perm string) string
- func (u SomaUtil) GetPropertyIdByName(c *resty.Client, pType string, prop string, ctx string) string
- func (u SomaUtil) GetRepositoryDetails(c *resty.Client, repoId string) *proto.Repository
- func (u SomaUtil) GetRepositoryIdByName(c *resty.Client, repo string) string
- func (u SomaUtil) GetRepositoryIdForBucket(c *resty.Client, bucket string) string
- func (u SomaUtil) GetRequest(c *resty.Client, p string) *resty.Response
- func (u SomaUtil) GetRequestWithBody(c *resty.Client, body interface{}, p string) *resty.Response
- func (u SomaUtil) GetServerAssetIdByName(c *resty.Client, serverName string) uint64
- func (u SomaUtil) GetServerIdByAssetId(cache *db.DB, c *resty.Client, aid uint64) string
- func (u SomaUtil) GetServerIdByName(cache *db.DB, c *resty.Client, server string) string
- func (u SomaUtil) GetTeamIdByName(c *resty.Client, teamName string) string
- func (u SomaUtil) GetTeamIdByRepositoryId(c *resty.Client, repo string) string
- func (u *SomaUtil) GetUserIdByName(c *resty.Client, user string) string
- func (u *SomaUtil) GetValidatedBool(s string) bool
- func (u *SomaUtil) GetValidatedUint64(s string, min uint64) uint64
- func (u *SomaUtil) IsUUID(s string) bool
- func (u *SomaUtil) NotImplemented(txt ...string)
- func (u *SomaUtil) ParseVariableArguments(keys []string, rKeys []string, args []string) (map[string]string, []string)
- func (u *SomaUtil) ParseVariadicArguments(multKeys []string, uniqKeys []string, reqKeys []string, args []string) map[string][]string
- func (u *SomaUtil) ParseVariadicCapabilityArguments(c *resty.Client, multKeys []string, uniqKeys []string, reqKeys []string, ...) (map[string][]string, []proto.CapabilityConstraint)
- func (u *SomaUtil) ParseVariadicCheckArguments(args []string) (map[string][]string, []proto.CheckConfigConstraint, ...)
- func (u SomaUtil) PatchRequestWithBody(c *resty.Client, body interface{}, p string) *resty.Response
- func (u SomaUtil) PostRequestWithBody(c *resty.Client, body interface{}, p string) *resty.Response
- func (u SomaUtil) PutRequest(c *resty.Client, p string) *resty.Response
- func (u SomaUtil) PutRequestWithBody(c *resty.Client, body interface{}, p string) *resty.Response
- func (u *SomaUtil) ReadPasswordFromTerminal() (string, error)
- func (u SomaUtil) ResultFromResponse(resp *resty.Response) (*proto.Result, error)
- func (u *SomaUtil) SliceContainsString(s string, sl []string) bool
- func (u *SomaUtil) StringIsKeyword(s string, keys []string) bool
- func (u SomaUtil) TeamIdForBucket(c *resty.Client, bucket string) string
- func (u SomaUtil) TeamIdForNode(c *resty.Client, node string) string
- func (u SomaUtil) TryGetBucketByUUIDOrName(c *resty.Client, b string, r string) string
- func (u *SomaUtil) TryGetCapabilityByUUIDOrName(c *resty.Client, s string) string
- func (u *SomaUtil) TryGetCheckByUUIDOrName(c *resty.Client, ck string, r string) string
- func (u SomaUtil) TryGetClusterByUUIDOrName(c *resty.Client, cl string, b string) string
- func (u SomaUtil) TryGetCustomPropertyByUUIDOrName(c *resty.Client, s string, r string) string
- func (u SomaUtil) TryGetGroupByUUIDOrName(c *resty.Client, g string, b string) string
- func (u *SomaUtil) TryGetLevelNameByNameOrShort(c *resty.Client, s string) string
- func (u *SomaUtil) TryGetMonitoringByUUIDOrName(c *resty.Client, s string) string
- func (u SomaUtil) TryGetNodeByUUIDOrName(c *resty.Client, s string) string
- func (u SomaUtil) TryGetOncallByUUIDOrName(c *resty.Client, s string) string
- func (u *SomaUtil) TryGetPermissionByUUIDOrName(c *resty.Client, s string) string
- func (u SomaUtil) TryGetRepositoryByUUIDOrName(c *resty.Client, s string) string
- func (u SomaUtil) TryGetServerByUUIDOrName(cache *db.DB, c *resty.Client, s string) string
- func (u SomaUtil) TryGetServicePropertyByUUIDOrName(c *resty.Client, s string, t string) string
- func (u SomaUtil) TryGetSystemPropertyByUUIDOrName(c *resty.Client, s string) string
- func (u SomaUtil) TryGetTeamByUUIDOrName(c *resty.Client, s string) string
- func (u SomaUtil) TryGetTemplatePropertyByUUIDOrName(c *resty.Client, s string) string
- func (u *SomaUtil) TryGetUserByUUIDOrName(c *resty.Client, s string) string
- func (u *SomaUtil) TryResolveGrantId(c *resty.Client, rtyp, rid, pid, cat string) string
- func (u SomaUtil) UnfilteredResultFromResponse(resp *resty.Response) *proto.Result
- func (u *SomaUtil) ValidateCliArgument(c *cli.Context, pos uint8, s string)
- func (u *SomaUtil) ValidateCliArgumentCount(c *cli.Context, i uint8)
- func (u *SomaUtil) ValidateCliMinArgumentCount(c *cli.Context, i uint8)
- func (u *SomaUtil) ValidatePasswordStrength(pass string) bool
- func (u SomaUtil) ValidatePhoneNumber(n string)
- func (u *SomaUtil) ValidateProviderExists(c *resty.Client, s string)
- func (u *SomaUtil) ValidateRuneCount(s string, l int) string
- func (u *SomaUtil) ValidateRuneCountRange(s string, lower, higher int)
- func (u *SomaUtil) ValidateStringAsBool(s string)
- func (u *SomaUtil) ValidateStringAsEmployeeNumber(s string)
- func (u *SomaUtil) ValidateStringAsMailAddress(s string)
- func (u *SomaUtil) ValidateStringAsNodeAssetId(s string)
- func (u *SomaUtil) ValidateStringInSlice(s string, sl []string)
- func (u *SomaUtil) ValidateUnitExists(c *resty.Client, s string)
- func (u SomaUtil) VerifyEnvironment(c *resty.Client, env string)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type SomaError ¶
type SomaError struct {
// contains filtered or unexported fields
}
func (SomaError) RequestError ¶
type SomaUtil ¶
func (*SomaUtil) AbortOnError ¶
func (SomaUtil) BucketByUUIDOrName ¶
func (SomaUtil) BucketIdByName ¶
func (*SomaUtil) CheckRestyResponse ¶
func (u *SomaUtil) CheckRestyResponse(resp *resty.Response)
func (*SomaUtil) CheckServerKeyword ¶
func (SomaUtil) CheckStringIsServiceAttribute ¶
func (SomaUtil) CheckStringIsSystemProperty ¶
func (*SomaUtil) CheckStringNotAKeyword ¶
func (SomaUtil) CleanConstraints ¶
func (u SomaUtil) CleanConstraints(c *resty.Client, constraints []proto.CheckConfigConstraint, repoId string, teamId string) []proto.CheckConfigConstraint
func (SomaUtil) CleanThresholds ¶
func (u SomaUtil) CleanThresholds(c *resty.Client, thresholds []proto.CheckConfigThreshold) []proto.CheckConfigThreshold
func (*SomaUtil) DecodeCheckConfigurationResultFromResponse ¶
func (SomaUtil) DecodeProtoResultAttributeFromResponse ¶
func (SomaUtil) DecodeProtoResultBucketFromResponse ¶
func (*SomaUtil) DecodeProtoResultCapabilityFromResponse ¶
func (SomaUtil) DecodeProtoResultClusterFromResponse ¶
func (SomaUtil) DecodeProtoResultGroupFromResponse ¶
func (*SomaUtil) DecodeProtoResultLevelFromResponse ¶
func (*SomaUtil) DecodeProtoResultMonitoringFromResponse ¶
func (SomaUtil) DecodeProtoResultNodeFromResponse ¶
func (SomaUtil) DecodeProtoResultOncallFromResponse ¶
func (SomaUtil) DecodeProtoResultPropertyFromResponse ¶
func (SomaUtil) DecodeProtoResultRepositoryFromResponse ¶
func (SomaUtil) DecodeProtoResultServerFromResponse ¶
func (SomaUtil) DecodeProtoResultTeamFromResponse ¶
func (SomaUtil) DecodeResultFromResponse ¶
func (SomaUtil) DeleteRequest ¶
DELETE
func (SomaUtil) DeleteRequestWithBody ¶
func (SomaUtil) FindSourceForBucketProperty ¶
func (SomaUtil) FindSourceForClusterProperty ¶
func (SomaUtil) FindSourceForGroupProperty ¶
func (SomaUtil) FindSourceForNodeProperty ¶
func (SomaUtil) FindSourceForRepoProperty ¶
func (SomaUtil) GetBucketDetails ¶
func (SomaUtil) GetBucketIdByName ¶
func (*SomaUtil) GetCapabilityIdByName ¶
func (*SomaUtil) GetCheckByName ¶
func (SomaUtil) GetClusterDetails ¶
func (SomaUtil) GetClusterIdByName ¶
func (*SomaUtil) GetFullArgumentSlice ¶
func (SomaUtil) GetGroupDetails ¶
func (SomaUtil) GetGroupIdByName ¶
func (*SomaUtil) GetMonitoringIdByName ¶
func (*SomaUtil) GetNewPassword ¶
func (SomaUtil) GetNodeConfigById ¶
func (u SomaUtil) GetNodeConfigById(c *resty.Client, node string) *proto.NodeConfig
func (SomaUtil) GetNodeDetails ¶
func (SomaUtil) GetNodeIdByName ¶
func (SomaUtil) GetObjectIdForCheck ¶
func (SomaUtil) GetOncallDetailsById ¶
func (SomaUtil) GetOncallIdByName ¶
func (*SomaUtil) GetPermissionIdByName ¶
func (SomaUtil) GetPropertyIdByName ¶
func (SomaUtil) GetRepositoryDetails ¶
func (u SomaUtil) GetRepositoryDetails(c *resty.Client, repoId string) *proto.Repository
func (SomaUtil) GetRepositoryIdByName ¶
func (SomaUtil) GetRepositoryIdForBucket ¶
func (SomaUtil) GetRequest ¶
GET
func (SomaUtil) GetRequestWithBody ¶
func (SomaUtil) GetServerAssetIdByName ¶
func (SomaUtil) GetServerIdByAssetId ¶
func (SomaUtil) GetServerIdByName ¶
func (SomaUtil) GetTeamIdByName ¶
func (SomaUtil) GetTeamIdByRepositoryId ¶
func (*SomaUtil) GetUserIdByName ¶
func (*SomaUtil) GetValidatedBool ¶
func (*SomaUtil) GetValidatedUint64 ¶
func (*SomaUtil) NotImplemented ¶
func (*SomaUtil) ParseVariableArguments ¶
func (*SomaUtil) ParseVariadicArguments ¶
func (u *SomaUtil) ParseVariadicArguments( multKeys []string, uniqKeys []string, reqKeys []string, args []string, ) map[string][]string
* This function parses whitespace separated argument lists of * keyword/value pairs were keywords can be specified multiple * times, some keywords are required and some only allowed once. * Sequence of multiple keywords are detected and lead to abort * * multKeys => [ "port", "transport" ] * uniqKeys => [ "team" ] * reqKeys => [ "team" ] * args => [ "port", "53", "transport", "tcp", "transport", * "udp", "team", "ITOMI" ] * * result => result["team"] = [ "ITOMI" ] * result["port"] = [ "53" ] * result["transport"] = [ "tcp", "udp" ]
func (*SomaUtil) ParseVariadicCapabilityArguments ¶
func (*SomaUtil) ParseVariadicCheckArguments ¶
func (u *SomaUtil) ParseVariadicCheckArguments(args []string) ( map[string][]string, []proto.CheckConfigConstraint, []proto.CheckConfigThreshold, )
func (SomaUtil) PatchRequestWithBody ¶
PATCH
func (SomaUtil) PostRequestWithBody ¶
POST
func (SomaUtil) PutRequest ¶
PUT
func (SomaUtil) PutRequestWithBody ¶
func (*SomaUtil) ReadPasswordFromTerminal ¶
func (SomaUtil) ResultFromResponse ¶
func (*SomaUtil) SliceContainsString ¶
func (*SomaUtil) StringIsKeyword ¶
XXX DEPRECATED FOR SliceContainsString
func (SomaUtil) TeamIdForBucket ¶
func (SomaUtil) TeamIdForNode ¶
func (SomaUtil) TryGetBucketByUUIDOrName ¶
func (*SomaUtil) TryGetCapabilityByUUIDOrName ¶
func (*SomaUtil) TryGetCheckByUUIDOrName ¶
func (SomaUtil) TryGetClusterByUUIDOrName ¶
func (SomaUtil) TryGetCustomPropertyByUUIDOrName ¶
func (SomaUtil) TryGetGroupByUUIDOrName ¶
func (*SomaUtil) TryGetLevelNameByNameOrShort ¶
func (*SomaUtil) TryGetMonitoringByUUIDOrName ¶
func (SomaUtil) TryGetNodeByUUIDOrName ¶
func (SomaUtil) TryGetOncallByUUIDOrName ¶
func (*SomaUtil) TryGetPermissionByUUIDOrName ¶
func (SomaUtil) TryGetRepositoryByUUIDOrName ¶
func (SomaUtil) TryGetServerByUUIDOrName ¶
func (SomaUtil) TryGetServicePropertyByUUIDOrName ¶
func (SomaUtil) TryGetSystemPropertyByUUIDOrName ¶
func (SomaUtil) TryGetTeamByUUIDOrName ¶
func (SomaUtil) TryGetTemplatePropertyByUUIDOrName ¶
func (*SomaUtil) TryGetUserByUUIDOrName ¶
func (*SomaUtil) TryResolveGrantId ¶
func (SomaUtil) UnfilteredResultFromResponse ¶
func (*SomaUtil) ValidateCliArgument ¶
func (*SomaUtil) ValidateCliArgumentCount ¶
func (*SomaUtil) ValidateCliMinArgumentCount ¶
func (*SomaUtil) ValidatePasswordStrength ¶
func (SomaUtil) ValidatePhoneNumber ¶
func (*SomaUtil) ValidateProviderExists ¶
func (*SomaUtil) ValidateRuneCountRange ¶
func (*SomaUtil) ValidateStringAsBool ¶
func (*SomaUtil) ValidateStringAsEmployeeNumber ¶
func (*SomaUtil) ValidateStringAsMailAddress ¶
func (*SomaUtil) ValidateStringAsNodeAssetId ¶
func (*SomaUtil) ValidateStringInSlice ¶
func (*SomaUtil) ValidateUnitExists ¶
func (SomaUtil) VerifyEnvironment ¶
Source Files ¶
- aborts.go
- cli_arguments.go
- client_requests.go
- helper.go
- helper_attributes.go
- helper_bucket.go
- helper_capability.go
- helper_checkconfigurations.go
- helper_cluster.go
- helper_group.go
- helper_level.go
- helper_monitoring.go
- helper_nodes.go
- helper_oncall.go
- helper_permission.go
- helper_property.go
- helper_repository.go
- helper_rights.go
- helper_server.go
- helper_team.go
- helper_user.go
- password_input.go
- proto.go
- struct_somautil.go
- validation.go