Skip to content

Conversation

@tuananhnguyen-ct
Copy link

Fixes #157

Signed-off-by: Tuan Anh Nguyen <[email protected]>
@tuananhnguyen-ct tuananhnguyen-ct requested a review from a team as a code owner August 30, 2024 05:01
@tuananhnguyen-ct
Copy link
Author

@SaaldjorMike @jespermbyskov anyone can have a quick look please?

}

func (i *IngestTokens) Add(repositoryName string, tokenName string, parser string) (*IngestToken, error) {
func (i *IngestTokens) Add(repositoryName string, tokenName string, parser string, customToken string) (*IngestToken, error) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This would be a breaking change for Go API users.

Could we rename it to AddV2 and call it from ingest_tokens_add.go and Add() to keep the signature? @SaaldjorMike

func (i *IngestTokens) Add(repositoryName string, tokenName string, parser string) (*IngestToken, error) {
	return i.AddV2(repositoryName, tokenName, parser, "")
}

@SaaldjorMike
Copy link
Contributor

The most recent changes refactors how we interact with GraphQL for the humioctl tool. Going forward, you have to

  1. update https://github.com/humio/cli/tree/master/internal/api/humiographql with any new interaction with the LogScale GraphQL API
  2. generate Go-code based on the updated GraphQL queries/mutations: go generate ./...
  3. update humioctl within https://github.com/humio/cli/tree/master/cmd/humioctl so it uses the newly generated code

Right now the code path is as follows: https://github.com/humio/cli/tree/master/cmd/humioctl calls https://github.com/humio/cli/tree/master/internal/api which in turn calls the autogenerated code in https://github.com/humio/cli/blob/master/internal/api/humiographql/humiographql.go.

Signed-off-by: Tuan Anh Nguyen <[email protected]>
@tuananhnguyen-ct tuananhnguyen-ct deleted the ingest-token-custom-value branch August 7, 2025 02:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Allow custom ingest tokens in the API

3 participants